Rebasing this commit on top of the fix for archiving extended tweets.

This commit is contained in:
Alex Huddleston 2020-05-16 19:20:13 +00:00
parent e3248f29c2
commit 5cb2c7a751

View file

@ -69,7 +69,9 @@ def archive_media_status(status):
str -- None, or a list of filenames of the media archived locally
"""
try:
if(not ('retweeted_status' in status._json.keys())):
if(not ('retweeted_status' in status._json.keys()) and
not (status.in_reply_to_status_id) and
not (status.in_reply_to_user_id)):
if('extended_tweet' in status._json.keys()):
if('extended_entities' in status.extended_tweet.keys()):
if('media' in status.extended_tweet['extended_entities'].keys()):