Check that url contains slash

main
Bob Mottram 2022-05-26 12:50:25 +01:00
parent 826cef3372
commit 88fe018f1b
1 changed files with 4 additions and 1 deletions

View File

@ -169,7 +169,10 @@ def _cache_svg_images(session, base_dir: str, http_prefix: str,
continue continue
if '://' + i2p_domain in url: if '://' + i2p_domain in url:
continue continue
filename = url.split('/')[-1] if '/' in filename:
filename = url.split('/')[-1]
else:
filename = url
image_filename = \ image_filename = \
base_dir + '/media/' + post_id + '_' + filename base_dir + '/media/' + post_id + '_' + filename
if not download_image(session, base_dir, url, if not download_image(session, base_dir, url,