What command to use instead of urllib.request.urlretrieve?
Deprecated is one thing, might become deprecated at some point in the future is another. If it suits your needs, I’d continuing using urlretrieve. That said, you can use shutil.copyfileobj: from urllib.request import urlopen from shutil import copyfileobj with urlopen(my_url) as in_stream, open(‘my_filename’, ‘wb’) as out_file: copyfileobj(in_stream, out_file)