From aa2f40163637328e917227f50be15c519028fd00 Mon Sep 17 00:00:00 2001 From: Ching Date: Fri, 11 Feb 2022 22:25:47 +0800 Subject: [PATCH] fix(scripts): fix typo fix typo Signed-off-by: Ching --- scripts/ins2mastodon.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/ins2mastodon.py b/scripts/ins2mastodon.py index 2d4c7f4..b66e1bd 100755 --- a/scripts/ins2mastodon.py +++ b/scripts/ins2mastodon.py @@ -39,7 +39,7 @@ def send_image_to_mastodon(image_url, text): media_ids = [toot_resp['id']] mastodon_cli.status_post(text, media_ids=media_ids) logger.info('send %s', text) - image_name = urlparse(url).path.split('/')[-1] + image_name = url.path.split('/')[-1] with open(settings.MASTODON_SYNCED_IMAGES_LOG, 'a') as f: f.write(image_name + '\n')