Skip to content

Instantly share code, notes, and snippets.

@serhii73
Created February 11, 2017 16:58
Show Gist options
  • Save serhii73/afe26c1eed5af93404b37d620c4dbe8b to your computer and use it in GitHub Desktop.
Save serhii73/afe26c1eed5af93404b37d620c4dbe8b to your computer and use it in GitHub Desktop.
r = requests.get(url)
with open('test.html', 'w') as output_file:
output_file.write(r.text.encode('cp1251'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment