How to download (PDF) files with Python/Scrapy using the Files Pipeline?

后端 未结 1 1567
渐次进展
渐次进展 2021-01-26 01:39

Using Python 3.7.2 on Windows 10 I\'m struggling with the task to let Scrapy v1.5.1 download some PDF files. I followed the docs but I seem to miss something. Scrapy gets me the

相关标签:
1条回答
  • 2021-01-26 02:22

    The FILES_URLS_FIELD setting tells the pipeline what field of the item contains the urls you want to download.

    By default, this is file_urls, but if you change the setting, you also need to change the field name (key) you're storing the urls in.

    So you have two options - either use the default setting, or rename your item's field to PDF_urls as well.

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