diff --git a/modules/reddit.py b/modules/reddit.py index d3f03a1..7d481b7 100644 --- a/modules/reddit.py +++ b/modules/reddit.py @@ -79,7 +79,7 @@ def parselisten(msg): def parseresponse(msg): global LAST_SUBS - if hasattr(msg, "text") and msg.text: + if hasattr(msg, "text") and msg.text and type(msg.text) == str: urls = re.findall("www.reddit.com(/\w/\w+/?)", msg.text) for url in urls: for recv in msg.to: diff --git a/modules/youtube-title.py b/modules/youtube-title.py index ebae4b6..fe62cda 100644 --- a/modules/youtube-title.py +++ b/modules/youtube-title.py @@ -82,7 +82,7 @@ def parselisten(msg): @hook.post() def parseresponse(msg): global LAST_URLS - if hasattr(msg, "text") and msg.text: + if hasattr(msg, "text") and msg.text and type(msg.text) == str: urls = re.findall("([a-zA-Z0-9+.-]+:(?://)?[^ :]+)", msg.text) for url in urls: o = urlparse(_getNormalizedURL(url))