Remove trailing slash in Imgur links
This commit is contained in:
parent
d9628d54a6
commit
7c5cac9692
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue