Answer the question
In order to leave comments, you need to log in
Scrapy requests in a loop with a delay?
The idea is that after authorization on the site, you need to make the same request with a delay of 1 minute, how to implement this?
How to implement this kind of logic:
import scrapy
import time
class ParseSpider(scrapy.Spider):
def start(self):
return scrapy.FormRequest(url='example.com',
formdata=data,
callback=self.nextRequest)
def nextRequest(self, response):
while True:
time.sleep(60)
yield scrapy.FormRequest(url='requestForm.com',
formdata=data,
callback=self.res)
def res(self, response):
....
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question