diff --git a/ash.py b/ash.py index 769358e..4417bc4 100644 --- a/ash.py +++ b/ash.py @@ -80,6 +80,7 @@ def toot_to_tweet(status: dict) -> dict: } media = [ { + 'type': att.get('type'), 'media_url_https': att['url'], 'description': att['description'] } @@ -447,8 +448,8 @@ def get_tweet(tweet_id, ext): videos.append({ 'url': media_url, }) - # type is photo - elif m.get('type') == 'photo': + # type is photo (tweet) or image (toot) + elif m.get('type') in ('photo', 'image'): media_url = m['media_url_https'] if not _is_external_tweet: media_url = replace_media_url(media_url)