how to call output filename from scrapy

前端 未结 1 1921
忘掉有多难
忘掉有多难 2021-01-20 16:04
scrapy crawl test -o test123.csv

How can I call the Output filename from code i.e I would like to use the filename inputed in terminal in spi

1条回答
  •  时光取名叫无心
    2021-01-20 16:25

    You can use self.settings.attributes["FEED_URI"].value in your spider to get output file name.

    0 讨论(0)
提交回复
热议问题