Hello, I'm trying to extract a description from a website. The page from which to extract the code is this one: https://www.lladro.com/it_it/figurina-biancaneve-it-it-01009320.html
This is the code snippet:
# Estrazione della descrizione con BeautifulSoup
description = "NO_DESCRIPTION"
try:
description_element = soup.find("div", class_="mb-2 text-sm 2xl:text-base")
if description_element:
description = description_element.get_text(strip=True)
except Exception as e:
print(f"Descrizione non trovata per {product_url}: {e}")
The code works but it extracts the text contained in another <div> with the same css class "mb-2 text-sm 2xl:text-base". Now extract the text contained in the drop-down menu "Assicurazione LladrΓ³ gratuita", instead I need the description that can be found by pressing the "Dettagli del prodotto" button, after the title "Descrizione:". This information is already present in the code without the need to press the button "Dettagli prodotto".
Can you tell me how I could extract this information?
I hope I was clear. Thanks