Hello, im a student and im trying to learn python - selenium.
Im trying to build the same like in this video
Timestamp for my Problem : 2:23:27
the problem is… i cant find / connect the classes/ids to my script. Booking.com changed some code i guess.
Im trying to grab some data from the site with
print(len(bot.report_results()))
def report_results(self):
hotel_boxes = self.find_element(By.ID,
'search_results_table'
).find_elements(By.CLASS_NAME,'d4924c9e74')
return hotel_boxes
The problem is, i cant grab the data cause its numeric-alphabetic. my script doesnt accept that. And cant even read the Data in it. I tried anything with the developer tool on chrome, but there is not data in this table. but there SHOULD be data (hotels)
In the video its ID"hotellist_inner" and CLASS"sr_Property_Block"
Im trying since 7 hours to fix this problem, but i cant ![]()
File "c:\Users\basti\Abschluss\run.py", line 17, in <module>
print(len(bot.report_results()))
AttributeError: 'Booking' object has no attribute 'report_results'
The answer should be “25”
Would be great if someone knows how to fix it ![]()
Greetings
Bastian