• Tools
  • Articles
  • Q&A
  • Login
0 0

scrapy抓取的GBK编码的网页,怎么转为utf-8?


scrapy抓取的GBK编码的网页,怎么转为utf-8?

python python-爬虫 python2.7 scrapy

9 years, 9 months ago
刺眼旳温柔。

刺眼旳温柔。


share
刺眼旳温柔。 9 years, 9 months ago

Answers

0

content.decode('GBK').encode('utf-8')

answered 9 years, 9 months ago
刺眼旳温柔。

wao661


share
wao661 answered 9 years, 9 months ago

Your Answer

Ask Question
Related questions

scrapy自动翻页采集,第二页跳转后,爬虫自动结束

python初学者爬知乎时遇到的有关登陆的问题

用python抓新浪首页,返回的是乱码

一段中文字符,统计每个字出现的次数,求解决思路

用BS4将信息写入文件时遇到的问题

用scrapy爬取网易新闻时出错[新手]