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 to run C# code using mono without Xamarin in Android? -

c# - SharpSsh Command Execution -

python - Specify path of savefig with pylab or matplotlib -