Over 1M Microsoft eBooks Given Away in 2 Days(blogs.msdn.com)
blogs.msdn.com
Over 1M Microsoft eBooks Given Away in 2 Days
http://blogs.msdn.com/b/mssmallbiz/archive/2014/07/10/over-1-million-free-microsoft-ebooks-given-away-in-2-days-and-soon-to-be-2-million.aspx
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)