- #DOWNLOAD TWITTER VIDEO USING API IN PYTHON HOW TO#
- #DOWNLOAD TWITTER VIDEO USING API IN PYTHON MP4#
- #DOWNLOAD TWITTER VIDEO USING API IN PYTHON INSTALL#
- #DOWNLOAD TWITTER VIDEO USING API IN PYTHON FULL#
Shalvah says he got into development back in 2013, during his final year of secondary school (high school). The idea for comes from Shalvah Adebayo, a backend developer born and raised in Nigeria, and currently living in Lagos. The handy bot (aka DownloadThisVideo) offers a way to download both videos and GIFs from Twitter’s site for easier offline viewing. You may recall seeing requests to the Thread Reader app bot to “unroll” a long thread into readable copy, for example, and in more recent days you may have spotted Twitter users tagging a newer bot, on tweets with a video file attached. We check for t.Not all the bots on Twitter are spammers or democracy hackers. Using /other/ will attempt to run the twitter embed stuff on other websites videos - This is mostly experimental and doesn't really work for nowĪdvanced embeds are provided via a /oembed.json? endpoint - This is manually pointing at my server in /templates/index.html and should be changed from to whatever your domain is Using the /info/ endpoint will return a json that contains all video info that youtube-dl can grab about any given video
#DOWNLOAD TWITTER VIDEO USING API IN PYTHON MP4#
Using the /dir/ endpoint will return a redirect to the direct MP4 link, this can be useful for downloading a video This project is licensed under the Do What The Fuck You Want Public License Other stuff Url - used to tell the user where to look for the oembed endpoint, make sure to set this to your public facing url
Repo - used to change the repo url that some links redirect to Hybrid: This will start off by using the twitter API to grab tweet info, but if the rate limit is reached or the api fails for any other reason it will switch over to youtube-dl to avoid downtimeĬolor - Accepts a hex formatted color code, can change the embed colorĪppname - Can change the app name easily wherever it's shown Youtube-dl: the original method for grabbing twitter video links, this uses a guest token provided via youtube-dl and should work well for individual instances, but may not scale up to a very large amount of usageĪpi: this directly uses the twitter API to grab tweet info, limited to 900 calls per 15m Method - ( Options: youtube-dl, api, hybrid )
#DOWNLOAD TWITTER VIDEO USING API IN PYTHON INSTALL#
This script uses the youtube-dl python module, along with flask, twitter and pymongo, so install those with pip (you can use pip install -r requirements.txt) and start the server with python twitfix.py
#DOWNLOAD TWITTER VIDEO USING API IN PYTHON HOW TO#
Note: If you enjoy this service, please considering donating via Ko-Fi to help cover server costs How to run (server side) You can also simply type out 'fx' directly before '' in any valid twitter video url, and that will convert it into a working TwitFix url, for example: I now have a copy of this running on a Linode server, you can use it via the following url or (everything past /)
#DOWNLOAD TWITTER VIDEO USING API IN PYTHON FULL#
Just put the url to the server, and directly after, the full URL to the tweet you want to embed This also automatically embeds the first link in the text of non video tweets (API Only) How to use (discord side) Basic flask server that serves fixed twitter video embeds to desktop discord by using either the Twitter API or Youtube-DL to grab tweet video information.