requests shutil download file
import requests import shutil r = requests.get('url', stream=True) if r.status_code == 200: with open(path, 'wb') as f: r.raw.decode_content = True shutil.copyfileobj(r.raw, f)