You need to download the picture and save it via a direct link to it using python

Python 3.5 is used.

Reported as a duplicate by jfs , Xander , Cheg , Community Spirit Jul 30 '17 at 13:00 .

A similar question was asked earlier and an answer has already been received. If the answers provided are not exhaustive, please ask a new question .

  • Where are the difficulties? Add a code snippet to the question. - 0xdb

1 answer 1

>>> from urllib.request import urlretrieve >>> urlretrieve('http://i.imgur.com/viibQ1r.jpg', 'C://users/user/desktop/lol.png') ('C://users/user/desktop/lol.png', <http.client.HTTPMessage object at 0x01BB6130>) 

Or so:

 >>> from urllib.request import urlopen >>> with open('C://Users/User/Desktop/new_img.png', 'wb') as img: ... img.write(urlopen('http://i.imgur.com/viibQ1r.jpg').read()) 
  • I used the first method, everything worked - Anatoly