Browse Source

Remove trailing slash in Imgur links

master
blank X 1 year ago
parent
commit
7c5cac9692
  1. 2
      redditbot.py

2
redditbot.py

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