scrapy抓取后导出中文内容文件办法

https://stackoverflow.com/questions/9181214/scrapy-text-encoding#comment11599115_9195158

 

scrapy抓取后导出文件是unicode编码:

scrapy crawl cmgine -o cmgine.json

要想导出中文内容文件,解决办法:

Try adding the following line to the config file for Scrapy (i.e. settings.py):

FEED_EXPORT_ENCODING = 'utf-8'

Leave a Reply

Your email address will not be published. Required fields are marked *