Skip to content

Instantly share code, notes, and snippets.

@rafikahmed
Created September 29, 2018 10:21
Show Gist options
  • Save rafikahmed/92f7df4cd8641b1a2299078b6f2c0b74 to your computer and use it in GitHub Desktop.
Save rafikahmed/92f7df4cd8641b1a2299078b6f2c0b74 to your computer and use it in GitHub Desktop.
next_page= response.xpath("//li[@class='next']/a/@href").extract_first()
if next_page is not None:
next_page_link= response.urljoin(next_page)
yield scrapy.Request(url=next_page_link, callback=self.parse)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment