Issue
I'm making my own custom pipeline in scrapy project and you want access to -o
argument so I can use it in naming my exported file in the new pipeline:
scrapy crawl hotels -o hotels_file.csv --loglevel=ERROR
I want access to hotels_file.csv
for further use in my code
any help please ? thanks in advance :)
Solution
You can access from the spider by getting the value for 'FEED_URI' from the settings, like this:
filename = self.settings['FEED_URI']}
Answered By - Wim Hermans
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.