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