Skip to content

Instantly share code, notes, and snippets.

@lakshay-arora
Created September 30, 2019 06:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lakshay-arora/f43c80d933f13f05dae285cdfacf514c to your computer and use it in GitHub Desktop.
Save lakshay-arora/f43c80d933f13f05dae285cdfacf514c to your computer and use it in GitHub Desktop.
# extract the hotel name and price per room
for card in cards_data:
# get the hotel name
hotel_name = card.find('p')
# get the room price
room_price = card.find('li', attrs={'class': 'htl-tile-discount-prc'})
print(hotel_name.text, room_price.text)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment