Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
# coding: utf-8
import requests
chunk_size = 1024 * 1024 # 1mb
download_url = ''
downloaded_parts = 0
with open('download', 'wb') as fp:
response = requests.get(download_url, stream=True)
for content in response.iter_content(chunk_size):
downloaded_parts +=1
print('#' * downloaded_parts)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.