Over 1M Microsoft eBooks Given Away in 2 Days
blogs.msdn.com
blogs.msdn.com
f = open('file.txt') CHUNK = 16 * 1024 for line in f: req = urllib2.urlopen(line) file = req.geturl().split('/')[-1] file = urllib.unquote(file) if '.pdf' in file[len(file)-4:]: with open(file, 'wb') as fp: while True: chunk = req.read(CHUNK) if not chunk: break fp.write(chunk)