Update apihelper.py

Correct files downloading when proxy used.
This commit is contained in:
khabibr 2018-04-24 16:48:39 +06:00 committed by GitHub
parent 662c2c8797
commit 99ff104a3f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -105,7 +105,7 @@ def get_file_url(token, file_id):
def download_file(token, file_path):
url = FILE_URL.format(token, file_path)
result = _get_req_session().get(url)
result = _get_req_session().get(url, proxies=proxy)
if result.status_code != 200:
msg = 'The server returned HTTP {0} {1}. Response body:\n[{2}]' \
.format(result.status_code, result.reason, result.text)