Skip to content
This repository has been archived by the owner on Sep 29, 2023. It is now read-only.

Commit

Permalink
_download text_mode write encoding fix (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
hikiko4ern committed May 8, 2019
1 parent d3e6cc8 commit 2e649e0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dump.py
Expand Up @@ -14,7 +14,7 @@
import vk_api

NAME = 'VK Dump Tool'
VERSION = '0.9.7'
VERSION = '0.9.9'
API_VERSION = '5.95'


Expand Down
2 changes: 1 addition & 1 deletion modules/_download.py
Expand Up @@ -67,7 +67,7 @@ def _download(dmp, obj, folder, **kwargs):
try:
if kwargs.get('text_mode'):
r = requests.get(url, timeout=(30, 5))
with open(os.path.join(folder, fn), 'w') as f:
with open(os.path.join(folder, fn), 'w', encoding='utf-8') as f:
f.write(r.text)
else:
r = requests.get(url, stream=True, timeout=(30, 5))
Expand Down

0 comments on commit 2e649e0

Please sign in to comment.