Skip to content

Instantly share code, notes, and snippets.

@Adrian016
Adrian016 / PDFDownloader.py
Last active August 10, 2016 17:26
Download pdf from URL
import requests
def downloadpdf(url, outfile):
try:
webFile = requests.get(url)
with open(outfile, 'wb') as fd:
for chunk in webFile.iter_content(10000):
fd.write(chunk)
except IOError:
print('Download Error')