Selaa lähdekoodia

added a return for filename in the filedownloaded for roxbot.

tags/v1.8.0
Roxie Gibson 6 vuotta sitten
vanhempi
commit
dc5c6555f1
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. +1
    -1
      roxbot/http.py

+ 1
- 1
roxbot/http.py Näytä tiedosto

@@ -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:

Loading…
Peruuta
Tallenna