summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/url_titles.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/url_titles.py b/modules/url_titles.py
index 24783ac..932e557 100644
--- a/modules/url_titles.py
+++ b/modules/url_titles.py
@@ -71,6 +71,9 @@ class Module:
u = urllib2.urlopen(url)
except:
return
+ if not 'content-type' in u.headers:
+ u.close()
+ continue
if u.headers['content-type'].startswith('text/html'):
#s = u.read()
if 'content-encoding' in u.headers and u.headers['content-encoding'] == 'gzip':