0

I have logged in the web by using Selenium with Python. Now I want to find all the href links and download/save the webpage of the links without using .click(). The href is something like

<a href="project.cfm?CFID=162805&amp;CFTOKEN=98566707&amp;fromlist=1&amp;project_refid=10700290" target="_parent">sth (2) - 2 xox | oo - xx dd </a>

link example

undetected Selenium
  • 183,867
  • 41
  • 278
  • 352
Aaron
  • 45
  • 1
  • 7
  • Possible duplicate of [Get html using Python requests?](https://stackoverflow.com/questions/27803503/get-html-using-python-requests) – JeffC Oct 11 '17 at 13:36
  • hi! so u want to enter the href URL and save the websites html? – pupspulver May 07 '21 at 10:27

1 Answers1

-1

First you can get the links using below

listOFLinks =driver.find_elements_by_xpath("//a")

then iterate through the list

for link in listOFLinks
url = link.getAttribute("href");

You can print the url variable or save it into an array as per your requirement