J
J
JRazor2015-07-04 16:26:35
Python
JRazor, 2015-07-04 16:26:35

How to send the same address to Request multiple times in Scrapy?

Good afternoon!
When submitting the form, I ran into a problem - the same address is not sent again. Apparently Scrapy has re-submissions of the same links disabled by default. What setting gives me this option?
UPD. If used like this:

def parse(self):
    for data in years[1:8]:
        return Request(link, formdata={'year': str(data)}, callback=self.parse_year

def parse_year(self, response):
    print 'Hello!'

then Hello will be written once instead of 7. How can I make the parse_year function (this is the example function) always accept a link?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question