trim leading xkcd from title

This commit is contained in:
Ben Harris 2020-07-14 01:53:00 -04:00
parent 823ca9eeb4
commit 2a4bc5a9f6
1 changed files with 2 additions and 0 deletions

View File

@ -13,6 +13,8 @@ class Module(ModuleManager.BaseModule):
page = utils.http.request(url)
if page:
title = page.soup().title.contents[0]
if title.startswith("xkcd: "):
title = title[6:]
event["stdout"].write("%s: %s" % (title, url))
else:
event["stderr"].write("Unable to fetch xkcd")