用python selenium提取网页中的所有<a>标签中的超级链接地址

urls = driver.find_elements_by_xpath("//a")
 
for url in urls:
    print(url.get_attribute("href"))

 //获取特定位置的a标签

FLODERURLSLIST = []
floderurls = browser.find_elements_by_xpath("/html/body/table[6]//a")

    for floderurl in floderurls:
        result = floderurl.get_attribute("href")
        FLODERURLSLIST.append(result)
        print(result)
原文地址:https://www.cnblogs.com/leoych/p/12765296.html