I already posted last week, my bot is always blocked at the 321 page. I changed Scrapy settings but noticed that pages between 321 and the end seems to contain no item.
I'd like to know how to skip the pages generating mistakes. I tried this:
next_pages = response.xpath("//div[@class='pgLightPrevNext']/a/@href").extract() #essai pour accéder au contenu des pages suivantes
for next in next_pages:
absolute_url = self.base_url + next
try:
yield scrapy.Request(absolute_url, callback=self.parse_dir_contents)
except:
pass
But with no result. How can I skip those pages?
Thanks.