I'm currently learning this selenium beginners course. In booking.com based on the tutorial, you can find the id of the element but now that the tutorial was posted several months ago perhaps the web developer made some changes and all I can find now is this line of code and the class="_962ef834c cbe47aa30e" is same as those other filter options too I find that not unique
<div data-filters-group="class" class="_962ef834c cbe47aa30e">
here's what I did
def apply_star_rating(self):
star_filtration_box = self.driver.find_element_by_css_selector(
'div[data - filters - group = "class"]'
)