Skip to content
Advertisement

XMLFeedSpider not Producing an Output CSV

Having an issue with XMLFeedSpider. I can get the parsing to work on the scrapy shell, so it seems there is something going on with either the request, or the spider’s engagement. Whether I add a start_request() method or not, I seem to get the same error.

No output_file.csv is produced after running the spider.

I am able to get a scrapy.Spider and CrawlSpider to work, but can’t seem to figure out what I am doing wrong with the XMLFeedSpider.

This is the spider:

JavaScript

This is the item:

JavaScript

This is the output:

JavaScript

And if I remove the start_requests() method, I get this output:

JavaScript

Both ultimately end up with the same error.

Advertisement

Answer

According to https://docs.scrapy.org/en/latest/topics/feed-exports.html#feeds FEED param should be a dict. Like:

JavaScript
User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement