Skip to content

Instantly share code, notes, and snippets.

View apurva91's full-sized avatar

Apurva N. Saraogi apurva91

View GitHub Profile
@apurva91
apurva91 / downloadChunks.py
Created January 29, 2018 09:49 — forked from gourneau/downloadChunks.py
Download large files with Python urllib2 to a temp directory
import os
import urllib2
import math
def downloadChunks(url):
"""Helper to download large files
the only arg is a url
this file will go to a temp directory
the file will also be downloaded
in chunks and print out how much remains