Remove trailing slash in Imgur links

This commit is contained in:
blank X 2021-01-03 19:45:36 +07:00
parent d9628d54a6
commit 7c5cac9692
1 changed files with 1 additions and 1 deletions

View File

@ -301,7 +301,7 @@ async def main():
if domain.endswith('imgur.com'):
parsed[1] = 'i.imgur.com'
if parsed[2].startswith('/a/'):
albumid = os.path.split(parsed[2])[1]
albumid = os.path.split(parsed[2].rstrip('/'))[1]
async with session.get(f'https://imgur.com/ajaxalbums/getimages/{albumid}/hit.json?all=true') as resp:
apidata = (await resp.json())['data']
if apidata['count'] == 1: