Dec-23-2022, 07:06 PM
Hello,
How to extract links from this url:
Une sélection de concerts électroniques et électrisants
I tried different tags (using selenium) ... nothing works.
Thanks in advance.
How to extract links from this url:
Une sélection de concerts électroniques et électrisants
I tried different tags (using selenium) ... nothing works.
Thanks in advance.
from selenium import webdriver from selenium.webdriver.chrome.options import Options from selenium.webdriver.common.by import By url = 'https://www.arte.tv/fr/videos/RC-019798/electro-chillout/' pattern = '.css-zqu0w1' pattern_class = 'css-1tqpy7w' pattern_class = 'css-1wbmdb2' pattern_css = 'div.css-1tqpy7w:nth-child(1) > a:nth-child(1)' pattern_class1 = 'css-1wbmdb2 [herf]' #div.css-1tqpy7w:nth-child(2) > a:nth-child(1) pattern_id = 'teaserItemLink' options = Options() options.add_argument("--headless") driver = webdriver.Chrome(options=options) driver.get(url) grid = driver.find_elements(By.CLASS_NAME, pattern_class) for item in grid: print(item.text) aaa = driver.find_elements(By.CLASS_NAME, pattern_class1) print(aaa) bbb = driver.find_elements(By.ID, pattern_id) print(bbb)