Skip to content

Instantly share code, notes, and snippets.

@cbrannen9a
Created June 27, 2018 19:28
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save cbrannen9a/3774f60b063cbbb463b58707bf778c2d to your computer and use it in GitHub Desktop.
segement of code for reading request response into local file
with open(local_filename, 'wb') as f:
for chunk in r.iter_content(chunk_size=1024):
if chunk: # filter out keep-alive new chunks
f.write(chunk)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment