This should be used it you are using uWSGI and are not just running the script on its own as one worker db: Caches all links to a mongoDB database.TwitFix generates a config.json in its root directory the first time you run it, the options are:ĪPI - This will be where you put the credentials for your twitter API if you use this methodĭatabase - This is where you put the URL to your mongoDB database if you are using one I have included some files to give you a head start on setting this server up with uWSGI, though if you decide to use uWSGI I suggest you set up mongoDB link caching Config 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
#TWITTER VIDEO DOWNLOAD USING PYTHON API HOW TO#
Note: If you enjoy this service, please considering donating via Ko-Fi to help cover server costs How to run (server side)
![twitter video download using python api twitter video download using python api](https://miro.medium.com/max/552/1*ueJggh78L5A9O2utJe8C4w.png)
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 /) 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)
![twitter video download using python api twitter video download using python api](https://counciloftech.com/wp-content/uploads/2018/12/image-1024x637.png)
![twitter video download using python api twitter video download using python api](https://i.stack.imgur.com/VKVK7.png)
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.