web scraping - Unordered .csv fields in scrapy -


i developing spider several fields scrapy framework. when export scrapped fields .csv file, fields (or columns) unordered, not defined them in items.py file.

does know how solve issue?

thanks in advance.

class myspider(basespider):     filehandle1 = open('file.xls','w')     ---------------     def parse(self, response):             -----------             self.filehandle2.write("%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\n"%(item['a'],item['h'],item['g'],item['f'],item['e'],item['d'],item['c'],item['b']))         

Comments

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -