Unicode issue in scrapy python
问题 For two hours, I am searching for this topic and I have tried a lot of solutions but noen worked in my case Here's the code first import scrapy class HamburgSpider(scrapy.Spider): name = 'hamburg' #allowed_domains = ['https://www.hamburg.de'] start_urls = ['https://www.hamburg.de/branchenbuch/hamburg/10239785/n0/'] custom_settings = { 'FEED_EXPORT_FORMAT': 'utf-8' } def parse(self, response): #response=response.body.encode('utf-8') items = response.xpath("//div[starts-with(@class, 'item')]")