摘要: import chardet def get_charset(str): return chardet.detect(str)['encoding'] html = '' # bytes 字节串 charset = get_charset(html) decoded_html = html.decode(charset, 'ignore') print(decoded_html) ... 阅读全文
posted @ 2017-05-22 14:13 捕蛇者说 阅读(230) 评论(0) 推荐(0) 编辑