Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to download file in python

import urllib.request

print('Beginning file download with urllib2...')

url = 'http://i3.ytimg.com/vi/J---aiyznGQ/mqdefault.jpg'
urllib.request.urlretrieve(url, '/Users/scott/Downloads/cat.jpg')
Source by stackabuse.com #
 
PREVIOUS NEXT
Tagged: #download #file #python
ADD COMMENT
Topic
Name
5+4 =