1

how can I download the image from this URL: https://thispersondoesnotexist.com/ I know it hasn't some image-url but I hope to get some images from there.

My idea is to write a code to get more images from this URL.

10 Rep
  • 2,217
  • 7
  • 19
  • 33
Marki2112
  • 11
  • 1

1 Answers1

0

Duplicate: Loop through webpages and download all images

Python 2

Using urllib.urlretrieve

import urllib
urllib.urlretrieve("http://www.gunnerkrigg.com//comics/00000001.jpg", "00000001.jpg")

Python 3

Using urllib.request.urlretrieve (part of Python 3's legacy interface, works exactly the same)

import urllib.request
urllib.request.urlretrieve("http://www.gunnerkrigg.com//comics/00000001.jpg", "00000001.jpg")
  • When I use this example than I get following Error Message: "Forbidden" urllib.request.urlretrieve("https://thispersondoesnotexist.com/ ", "00000001.jpg") – Marki2112 Jun 12 '20 at 08:11
  • I mean when I use this code for this URL 'thispersondoesnotexist.com – Marki2112 Jun 12 '20 at 09:17