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

How can we post XML strings along with text strings in iOS -

How to run C# code using mono without Xamarin in Android? -

c# - cefsharp app remember password option -