From d972e7052967bb0ce449c8369d7d2cd82157836f Mon Sep 17 00:00:00 2001 From: Reese Moore Date: Fri, 30 Dec 2011 22:37:42 -0500 Subject: [PATCH] Move the content-type check back to the proper indent level, hopefully this makes the bot check for an html Content-Type and not download every file. --- modules/head.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/head.py b/modules/head.py index 36edf21..cafaa95 100644 --- a/modules/head.py +++ b/modules/head.py @@ -153,8 +153,9 @@ def gettitle(uri): try: mtype = info['content-type'] except: return None - if not (('/html' in mtype) or ('/xhtml' in mtype)): - return None + + if not (('/html' in mtype) or ('/xhtml' in mtype)): + return None bytes = web.get(uri) #bytes = u.read(262144)