Using the urllib module in python can complete common crawler programs, and use urlretrieve to capture a file
For example, in python3, you can use
import urllib urllib.request.ulrretrieve(url, filename)
Among them, url indicates the file link to be crawled, and filename indicates the name of the file saved to the local
But in python2.7, it is different
import urlib urllib.urlretrieve(url, filename)There is no request, otherwise an error will be reported, indicating that urllib.request cannot be found