parent
40470bc6d7
commit
1c73f26e2d
|
@ -362,7 +362,7 @@ async def main():
|
|||
if domain == 'imgur.com' or domain.endswith('.imgur.com'):
|
||||
parsed[1] = 'i.imgur.com'
|
||||
if parsed[2].startswith('/a/') or parsed[2].startswith('/gallery/'):
|
||||
albumid = os.path.split(parsed[2].rstrip('/'))[1]
|
||||
albumid = os.path.splitext(os.path.split(parsed[2].rstrip('/'))[1])[0]
|
||||
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