python3 download a file code example
Example 1: how to download file from python
import wget
url = "https://www.python.org/static/img/[email protected]"
wget.download(url, 'c:/users/LikeGeeks/downloads/pythonLogo.png')
Example 2: python3 download file
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')