Skip to content

Instantly share code, notes, and snippets.

@ThibaudLamothe
Created February 1, 2021 10:39
Show Gist options
  • Save ThibaudLamothe/975be0d0f6171da5b83567cb44df1418 to your computer and use it in GitHub Desktop.
Save ThibaudLamothe/975be0d0f6171da5b83567cb44df1418 to your computer and use it in GitHub Desktop.
def parse(self, response):
# Getting the hotels list
hotel_links = response.css('hotel_selector')
# Following hotels pages
for hotel in hotel_links:
yield response.follow(url=link, callback=self.parse_hotel)
# Get Next Page of hotels
next_page = response.css('next_page_selector').extract()
yield scrapy.Request(url=url, callback=self.parse)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment