Fixes #15 - issue with GIF tweets that return incorrect media bitrate
This commit is contained in:
parent
ad8830838c
commit
60ecfd2838
@ -285,7 +285,7 @@ def link_to_vnf_from_tweet_data(tweet,video_link):
|
|||||||
# Check to see if tweet has a video, if not, make the url passed to the VNF the first t.co link in the tweet
|
# Check to see if tweet has a video, if not, make the url passed to the VNF the first t.co link in the tweet
|
||||||
if tweetType(tweet) == "Video":
|
if tweetType(tweet) == "Video":
|
||||||
if tweet['extended_entities']['media'][0]['video_info']['variants']:
|
if tweet['extended_entities']['media'][0]['video_info']['variants']:
|
||||||
best_bitrate = 0
|
best_bitrate = -1
|
||||||
thumb = tweet['extended_entities']['media'][0]['media_url']
|
thumb = tweet['extended_entities']['media'][0]['media_url']
|
||||||
for video in tweet['extended_entities']['media'][0]['video_info']['variants']:
|
for video in tweet['extended_entities']['media'][0]['video_info']['variants']:
|
||||||
if video['content_type'] == "video/mp4" and video['bitrate'] > best_bitrate:
|
if video['content_type'] == "video/mp4" and video['bitrate'] > best_bitrate:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user