0

I want to do a search on booking, and take the price of the first hotel, as this.

The screenshot

This is the part of the code that interests me

<div class="prco-ltr-right-align-helper">
<div class="bui-price-display__value prco-inline-block-maker-helper" aria-hidden="true">
€&nbsp;702
</div>
<span class="bui-u-sr-only">
Prezzo
€&nbsp;702
</span>
</div>

This is my simple code in python

import requests
main_url = the link above
req = requests.get(main_url)
text = req.text
print(text.find('bui-u-sr-only'))
print(text.find('bui-price-display__value prco-inline-block-maker-helper'))

The two strings you're looking for are not present, why?

Onire77
  • 1
  • 1

0 Answers0