no! i forgot to also store fav/rt counts on twitter

This commit is contained in:
codl 2017-12-27 21:03:12 +01:00
parent 253bd78b12
commit b72fbac24d
No known key found for this signature in database
GPG Key ID: 6CD7C8891ED1233A
1 changed files with 4 additions and 0 deletions

View File

@ -115,6 +115,10 @@ def post_from_api_tweet_object(tweet, post=None):
if 'entities' in tweet:
post.has_media = bool(
'media' in tweet['entities'] and tweet['entities']['media'])
if 'favorite_count' in tweet:
post.favourites = tweet['favorite_count']
if 'retweet_count' in tweet:
post.reblogs = tweet['retweet_count']
return post