1
0
Fork 0

[urlreducer] add some checks

This commit is contained in:
nemunaire 2015-11-26 20:51:07 +01:00
parent 57c460fc9c
commit 707131023a
1 changed files with 1 additions and 1 deletions

View File

@ -91,7 +91,7 @@ def parselisten(msg):
@hook.post()
def parseresponse(msg):
global LAST_URLS
if hasattr(msg, "text") and msg.text:
if hasattr(msg, "text") and isinstance(msg.text, str):
urls = re.findall("([a-zA-Z0-9+.-]+:(?://)?(?:[^ :/]+:[0-9]+)?[^ :]+)", msg.text)
for url in urls:
o = urlparse(web._getNormalizedURL(url), "http")