blank X 3 months ago
parent
commit
1c73f26e2d
Signed by: blankie
GPG Key ID: CC15FC822C7F61F5
  1. 2
      redditbot.py

2
redditbot.py

@ -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…
Cancel
Save