Skip to content

Instantly share code, notes, and snippets.

@lakshay-arora
Created September 30, 2019 05:44
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/5eef53e0dca413139399ee4f0d23261e to your computer and use it in GitHub Desktop.
Save lakshay-arora/5eef53e0dca413139399ee4f0d23261e to your computer and use it in GitHub Desktop.
# find all the sections with specifiedd class name
cards_data = data.find_all('div', attrs={'class', 'width100 fl htlListSeo hotel-tile-srp-container hotel-tile-srp-container-template new-htl-design-tile-main-block'})
# total number of cards
print('Total Number of Cards Found : ', len(cards_data))
# source code of hotel cards
for card in cards_data:
print(card)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment