python3使用builtwith 出错的最简单处理方法

来源:互联网 发布:htc windows系统手机 编辑:程序博客网 时间:2024/06/02 01:01

python3 中经常遇到python2.* 的库不能使用的情况,这时首先用python内置的2to3工具对库所在文件夹进行转换。
这里写图片描述
注意:这个是我电脑上的文件路径,可能和你的不同

然后在builtwith/init.py 文件中,加入import chardet 并修改下面一段代码

# check html    if html:        #加入这一句        html = html.decode(chardet.detect(html)['encoding']

不过chardet 在识别中文网页时很可能出问题,没有百度到很好的解决方案。

参考:python3使用builtwith识别网站使用相关技术

原创粉丝点击