May-29-2022, 05:12 PM
Not sure that I understood how it works ... I mean using '>' symbol.
Searching for Reviews section of this book:
https://www.amazon.com/Discovering-Moder...136677649/
I tried a more classic approach: first find the section concerned by unique ID, then search in this ID section for the information to extract using the class name (the class name gives what I want to extract - the string "3.6 by 5")
Here is snippet I used for that:
Here is screenshot of the concerned fragment of book page with outlined "centers of interest":
Searching for Reviews section of this book:
https://www.amazon.com/Discovering-Moder...136677649/
I tried a more classic approach: first find the section concerned by unique ID, then search in this ID section for the information to extract using the class name (the class name gives what I want to extract - the string "3.6 by 5")
Here is snippet I used for that:
reviews_section = browser.find_element_by_id('acrPopover') score = reviews_section.find_elements_by_class_name('a-icon-alt') print(score[0].text)Unfortunately the print output is empty.
Here is screenshot of the concerned fragment of book page with outlined "centers of interest":