I having trouble with finding some data on this page. I need the link of the main image, and the sub images. I also need the text under the 2 tabs "Ingridients et allergens" and "Mode d'empoli et conservation". It seems to me that these are iframes (or the same iframe) but whatever I tried returns an error. Help will be much appreciated.
Thanks in advance
Edit: Here is an example of a non-working code:
browser = webdriver.Firefox()
link = 'https://naturalia.fr/sardines-naturel-95g'
browser.get(link)
try:
browser.find_element_by_xpath('''//*[@id="tab-label-ingredients_info-title"]''').click()
descr = browser.find_element_by_class_name('cms-content')
print('Description2: {}'.format(descr.text))
except Exception as e:
print(e)
try:
main_img = browser.find_element_by_xpath('''//*[@id="maincontent"]/div[2]/div[2]/div[2]/div/div[2]/div[2]/div[1]/div[3]/div[1]/img''').get_attribute('src')
print(main_img)
except Exception as e:
print(e)