elems = driver.find_elements_by_xpath("//a[@href]") for elem in elems: print(elem.get_attribute("href"))