ソースを参照

added a return for filename in the filedownloaded for roxbot.

tags/v1.8.0
Roxie Gibson 6年前
コミット
c927451358
1個のファイルの変更1行の追加1行の削除
  1. +1
    -1
      roxbot/http.py

+ 1
- 1
roxbot/http.py ファイルの表示

@@ -28,7 +28,7 @@ async def download_file(url, filename=None):
:param url:
"""
if filename is None:
filename = url.split("/")[-1]
filename = url.split("/")[-1].split("?")[0]
async with aiohttp.ClientSession() as session:
async with session.get(url, headers={'User-agent': 'RoxBot Discord Bot'}) as data:
with open(filename, 'wb') as f:

読み込み中…
キャンセル
保存