0

I have some Scrapy spiders which can crawl news from some newspapers. But currently I run them manually using this command -

scrapy crawl SpiderName

I am crawling news from 20 different news papers. I have 20 different spider classes to get this job done. So I have to run this command for 20 times when I want to crawl the latest news. I want it to be automatic. I want to write a script which can continuously crawl all these newspapers after a definite period of time. I have tried to do this using a infinite while loop. But this didn't work well. Is there any other standard way to do this?

Protik Nag
  • 511
  • 5
  • 20

1 Answers1

1

You can achieve this with scrapy-do

1.install

pip install scrapy-do

2.schedule

  scrapy-do-cl schedule-job --project quotesbot \
        --spider toscrape-css --when 'every 5 to 15 minutes'
Bogdan Veliscu
  • 641
  • 6
  • 11
  • 1
    I don't understand the schedule part. Where to run this command? Inside the spider folder? Does it crawl all the newspapers at a time? How to modify this command? – Protik Nag Mar 05 '20 at 09:35