samedi 1 mai 2021

I wish to recieve only links that match a specific cliteria | Selenium Python

SELENIUM PYTHON CODE

driver.get("https://www.youtube.com/")

link_mix = driver.find_elements_by_tag_name('a')

for linked in link_mix:
    print(linked.get_attribute('href'))

i wish to get only links that are youtube.com/contentcodexxxxxx

and not include header links and every other hyperlink... how can i filter these links




Aucun commentaire:

Enregistrer un commentaire