Skip to content

Instantly share code, notes, and snippets.

@pfultz2
Created February 23, 2016 19:54
Show Gist options
  • Select an option

  • Save pfultz2/d5f02d04a182ca19cf4a to your computer and use it in GitHub Desktop.

Select an option

Save pfultz2/d5f02d04a182ca19cf4a to your computer and use it in GitHub Desktop.
Download with progress bar
from tqdm import tqdm
import requests
url = "http://download.thinkbroadband.com/10MB.zip"
response = requests.get(url, stream=True)
with open("10MB", "wb") as handle:
for data in tqdm(response.iter_content()):
handle.write(data)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment