2018年10月25日

Python 之 解码汉字乱码(如果gbk、utf8都试过不行,可以试试这个)

摘要: 起因: 使用 requests.get(url) 获取页面内容,并打印出来后显示如下: 使用 type() 查看类型也是 <type 'unicode'> print [content] 显示的也是像utf-8的样子:[u'<div class="gw-error-body">\n\t\t<h1>A 阅读全文

posted @ 2018-10-25 15:11 刘[小]倩 阅读(8008) 评论(0) 推荐(1) 编辑

导航