I am trying to get a book's description text from its amazon webpage. I get the book's image and title and price fine by using driver.find_element_by_id
, but when it comes to the description which is in a div
with id="iframeContent"
, it doesn't work. Why? I have also tried WebDriverWait
but no luck.
I use the following code:
def get_product_description(self, url):
"""Returns the product description of the Amazon URL."""
self.driver.get(url)
try:
product_desc = self.driver.find_element_by_id("iframeContent")
except:
pass
if product_desc is None:
product_desc = "Not available"
return product_desc