diff options
| author | Jon Bergli Heier <snakebite@jvnv.net> | 2012-02-18 23:36:43 +0100 | 
|---|---|---|
| committer | Jon Bergli Heier <snakebite@jvnv.net> | 2012-02-18 23:36:43 +0100 | 
| commit | 82d2f6bd1a6f66e9c101ef0a6b98230753bff78c (patch) | |
| tree | 13755bea523ae512e3f6292b94e8948194d2ea7c | |
| parent | 7b8ddd1be9789e3e1a72f48f64356656b341956b (diff) | |
url_titles: Don't throw errors when missing Content-Type.
| -rw-r--r-- | modules/url_titles.py | 3 | 
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':  | 
