Browse Source

added a return for filename in the filedownloaded for roxbot.

tags/v1.8.0
Roxie Gibson 6 years ago
parent
commit
c927451358
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      roxbot/http.py

+ 1
- 1
roxbot/http.py View File

@@ -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…
Cancel
Save