Created
February 1, 2021 10:39
-
-
Save ThibaudLamothe/975be0d0f6171da5b83567cb44df1418 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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