i am an idiot
This commit is contained in:
parent
1347593c88
commit
cb6a43cf46
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue