recipe-224043.py 文件源码

python
阅读 30 收藏 0 点赞 0 评论 0

项目:code 作者: ActiveState 项目源码 文件源码
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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号