0

I am trying to download a lot of images. So with Selenium I achieved to log in and find the src of the image for example: www.....preview/big/104.jpg, after that I can just loop to all the other images like ..105...106 and so on.
My best solution is currently to take a screenshot of the whole window. This way I get the best resolution. But then I have black bars on the left and right. Also I tried to screenshot the element directly with

driver.find_element(By.TAG_NAME, 'img').screenshot()

After that the screenshot is very blurry. It would be best if I just had an option to save the image with right click and save as.
Does anyone have an idea how I could implement the whole thing ?
Thank you very much.

Reza Rahemtola
  • 1,182
  • 7
  • 16
  • 30
  • If you have the url, you can download based on the url instead of taking a screenshot of the element Check if this other question helps, or if you need something different: https://stackoverflow.com/questions/6813704/how-to-download-an-image-using-selenium-any-version (Also check: https://stackoverflow.com/questions/47424245/how-to-download-an-image-with-python-3-selenium-if-the-url-begins-with-blob/47425305#47425305 ) – qrsngky Mar 28 '22 at 17:04
  • first thanks for your fast response. The problem is the url is useless if i am not authenticated thats why i try to pass it through Selenium – Etienne Wille Mar 28 '22 at 17:12

0 Answers0