def checkforhtml(self, info, url):
# if info.has_key('content-type'):
# ctype = cgi.parse_header(info['content-type'])[0].lower()
# if ';' in ctype:
# # handle content-type: text/html; charset=iso8859-1 :
# ctype = ctype.split(';', 1)[0].strip()
# else:
# if url[-1:] == "/":
# return 1
# ctype, encoding = mimetypes.guess_type(url)
# if ctype == 'text/html':
# return 1
# else:
# self.note(1, " Not HTML, mime type %s", ctype)
# return 0
return 1
评论列表
文章目录