Skip to content Skip to sidebar Skip to footer

Scrapy: Scraping Csv File - Not Getting Any Output

I am following this example: CSVFeedSpider to scrape CSV data, 'item.xml' is generated but there's nothing in the xml file. Can anyone help? Thanks! csvspider.py class MySpider(CSV

Solution 1:

If you run the spider by itself, without the output parameters, then you would probably see errors similar to the following:

2014-05-1208:08:41+0100[scrapy]WARNING: ignoringrow1 (length: 3, should be: 2)
2014-05-1208:08:41+0100[scrapy]WARNING: ignoringrow2 (length: 3, should be: 2)

To fix the issue, modify your headers line in your spider code as follows:

headers = ['Item', 'Address', 'Website']

Post a Comment for "Scrapy: Scraping Csv File - Not Getting Any Output"