You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The issue with Twitter gifs is that they're encoded in .mp4 files, not .gifs. To upload them, it might be better to use gfycat.com or vid.me to properly mirror them.
We can use vid.me to mirror. Now, to get the URL from the tweet, this snippet demonstrates how to do so.
if tweet.extended_entities['media'][0]['type'] == 'animated_gif':
video_info = tweet.extended_entities['media'][0]['video_info']
print(video_info['variants'][0]['url'])
The variants array will always be a size of one. We would have to do this for every medium in the extended_entities array, which is already setup in twitter.py. So, that's it. Right now twitter.py only works if the tweet is of type 'photo', so there will be some logic added to it to ensure that Lapis can mirror .gifs from Twitter as well.
Here
The text was updated successfully, but these errors were encountered: