i am an idiot

This commit is contained in:
blank X 2020-09-04 17:43:36 +07:00
parent 1347593c88
commit cb6a43cf46
1 changed files with 2 additions and 2 deletions

View File

@ -190,8 +190,7 @@ async def main():
splitted = os.path.splitext(parsed[2]) splitted = os.path.splitext(parsed[2])
domain = getattr(random_post, 'domain', parsed[1]) domain = getattr(random_post, 'domain', parsed[1])
preview = getattr(random_post, 'preview', None) preview = getattr(random_post, 'preview', None)
if domain.endswith( if domain.endswith('imgur.com'):
'imgur.com'):
parsed[1] = 'i.imgur.com' parsed[1] = 'i.imgur.com'
if parsed[2].startswith('/a/'): if parsed[2].startswith('/a/'):
albumid = os.path.split(parsed[2])[1] albumid = os.path.split(parsed[2])[1]
@ -270,6 +269,7 @@ async def main():
if pimg: if pimg:
await _download_file(filename, pimg) await _download_file(filename, pimg)
files.append(filename) files.append(filename)
else:
tat = f'<a href="{url}">{zws}</a>{tat}' tat = f'<a href="{url}">{zws}</a>{tat}'
if pdesc: if pdesc:
caplength = 2047 if pimg else 4095 caplength = 2047 if pimg else 4095