From 707131023aca73f1c9975eea5a66277d7e9b8c90 Mon Sep 17 00:00:00 2001 From: nemunaire Date: Thu, 26 Nov 2015 20:51:07 +0100 Subject: [PATCH] [urlreducer] add some checks --- modules/urlreducer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/urlreducer.py b/modules/urlreducer.py index ec03307..cf9ee6b 100644 --- a/modules/urlreducer.py +++ b/modules/urlreducer.py @@ -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")