I am looking for a python download method where I can download the file directly to disk using a specified destination and file name, and if the download takes too long, time out.
From here it looks like there's three main python download options
https://stackabuse.com/download-files-with-python/
urllib.request.urlretrieve
does not have a timeout option.
requests.get(url)
Has timeout, but requires the file be opened before saving it. It also looks like it gets the file name from the url.
wget.download
also doesn't seem to have a timeout option.
Are there any python download methods that satisfy all three of my requirements?