1
0
mirror of https://github.com/eternnoir/pyTelegramBotAPI.git synced 2023-08-10 21:12:57 +03:00

Merge branch 'master' into patch-1

This commit is contained in:
FrankWang
2019-10-30 21:24:43 +08:00
committed by GitHub
3 changed files with 6 additions and 3 deletions

View File

@ -107,8 +107,8 @@ def get_file_url(token, file_id):
if FILE_URL is None:
return "https://api.telegram.org/file/bot{0}/{1}".format(token, get_file(token, file_id).file_path)
else:
return FILE_URL.format(token, get_file(token, file_id).file_path)
return FILE_URL.format(token, get_file(token, file_id)['file_path'])
def download_file(token, file_path):
url = FILE_URL.format(token, file_path)