Merge pull request #1 from Fam0r/main
Use the best bitrate video for twitter embeds
This commit is contained in:
commit
8df211090c
1 changed files with 1 additions and 0 deletions
|
@ -277,6 +277,7 @@ def link_to_vnf_from_api(video_link):
|
|||
for video in tweet['extended_entities']['media'][0]['video_info']['variants']:
|
||||
if video['content_type'] == "video/mp4" and video['bitrate'] > best_bitrate:
|
||||
url = video['url']
|
||||
best_bitrate = video['bitrate']
|
||||
elif tweetType(tweet) == "Text":
|
||||
url = ""
|
||||
thumb = ""
|
||||
|
|
Loading…
Reference in a new issue