cix-extractor-py
cix-extractor-py copied to clipboard
结果有乱码
如题,换了个网页直接打印结果乱码
@xxllp 网址?
ext = Extractor(url="http://www.ahgd.gov.cn/web_content.php?id=14971",blockSize=5, image=False) print(ext.getContext())
确实有乱码,我改用了BeautifulSoup+html5lib 解析网页
其实我在想为什么输出结果不仅没换行,连空格都没有
@klzsysy resp.encoding 指定为网页的encoding ,默认是UTF-8输出的,如果你的页面不是UTF-8肯定乱码了。