From 31ea479e38d961193a2bcd7cacac67258f060a2c Mon Sep 17 00:00:00 2001 From: Zhuoyun Wei Date: Sat, 29 Jul 2023 23:49:21 -0700 Subject: [PATCH] fix: show media for tweets extracted from legacy Twitter archive --- ash.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ash.py b/ash.py index 951ed08..b55dc3c 100644 --- a/ash.py +++ b/ash.py @@ -452,8 +452,8 @@ def get_tweet(tweet_id, ext): videos.append({ 'url': m['media_url_https'] }) - # type is photo (tweet) or image (toot) - elif m.get('type') in ('photo', 'toot-image'): + # type is photo (tweet) or image (toot) or None (legacy tweet) + elif m.get('type') in ('photo', 'toot-image', None): media_url = m['media_url_https'] if not _is_external_tweet: media_url = replace_media_url(media_url)