diff --git a/src/you_get/extractors/twitter.py b/src/you_get/extractors/twitter.py index 24a8c12c..c80eb211 100644 --- a/src/you_get/extractors/twitter.py +++ b/src/you_get/extractors/twitter.py @@ -62,6 +62,13 @@ def twitter_download(url, output_dir='.', merge=True, info_only=False, **kwargs) # if the tweet contains media, download them media = info['globalObjects']['tweets'][item_id]['extended_entities']['media'] + elif 'entities' in info['globalObjects']['tweets'][item_id]: + # if the tweet contains video from another tweet, download it + # FIXME: multiple urls? + expanded_url = info['globalObjects']['tweets'][item_id]['entities']['urls'][0]['expanded_url'] + item_id = r1(r'/(\d+)/video', expanded_url) + assert False + elif info['globalObjects']['tweets'][item_id].get('is_quote_status') == True: # if the tweet does not contain media, but it quotes a tweet # and the quoted tweet contains media, download them