Add extra case for Imgur
This commit is contained in:
parent
9cadb9541a
commit
d5ea663590
|
@ -208,7 +208,7 @@ async def main():
|
||||||
preview = getattr(random_post, 'preview', None)
|
preview = getattr(random_post, 'preview', None)
|
||||||
if domain.endswith('imgur.com'):
|
if domain.endswith('imgur.com'):
|
||||||
parsed[1] = 'i.imgur.com'
|
parsed[1] = 'i.imgur.com'
|
||||||
if parsed[2].startswith('/a/'):
|
if parsed[2].startswith('/a/') or not splitted[1]:
|
||||||
albumid = os.path.split(parsed[2])[1]
|
albumid = os.path.split(parsed[2])[1]
|
||||||
async with session.get(f'https://imgur.com/ajaxalbums/getimages/{albumid}/hit.json?all=true') as resp:
|
async with session.get(f'https://imgur.com/ajaxalbums/getimages/{albumid}/hit.json?all=true') as resp:
|
||||||
apidata = (await resp.json())['data']
|
apidata = (await resp.json())['data']
|
||||||
|
|
Loading…
Reference in New Issue