I am trying to download a file located on the web through write function with the wb mode. Files are being downloaded too slowly when it is compared to the speed of downloading through a web browser (as I have a high-speed internet connection). How can I accelerate the download speed? Is there a better way of handling file download?
Here is the way I use:
resp = session.get(download_url) with open(package_name + '.apk', 'wb+') as local_file: local_file.write(resp.content) I have experimented that the download speeds of requests and urllib3 libraries are almost the same. Here is the experimental result to download a 15 MB file:
requests:0:02:00.689587urllib3:0:02:05.833442
p.s. My Python version is 3.7.0, and my OS is Windows 10 version 1903.
p.s. I have investigated the reportedly similar question, but the answers/comments did not work.
download_url?