How can I get size of file while downloading it in Python so that I can show downloaded size and pending size of file to download? if file size is 2GB and 700mb is downloaded then how will we get that in python. Currently using Python requests module to download file.
example code:
import requests
r = requests.get(download_link)
with open('setup.exe','wb') as file:
file.write()