Actually return title text, not html Tag object (title.py)
This commit is contained in:
parent
2ac5a53131
commit
9f6aa93082
1 changed files with 5 additions and 1 deletions
|
@ -13,7 +13,11 @@ class Module(ModuleManager.BaseModule):
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
self.log.error("failed to get URL title", exc_info=True)
|
self.log.error("failed to get URL title", exc_info=True)
|
||||||
return None
|
return None
|
||||||
return page.data.title
|
if page.data.title:
|
||||||
|
return page.data.title.text.replace("\n", " ").replace(
|
||||||
|
"\r", "").replace(" ", " ").strip()
|
||||||
|
else:
|
||||||
|
return None
|
||||||
|
|
||||||
@utils.hook("received.message.channel")
|
@utils.hook("received.message.channel")
|
||||||
def channel_message(self, event):
|
def channel_message(self, event):
|
||||||
|
|
Loading…
Reference in a new issue