Fix Twitter video embeds in Discord (and Telegram!)
Find a file
2021-07-04 16:54:23 -05:00
__pycache__ Too Init To Quit 2021-07-03 18:52:30 -05:00
static/css Too Init To Quit 2021-07-03 18:52:30 -05:00
templates Added an embeded error message system to show when / why stuff might not be working 2021-07-04 05:08:36 -05:00
LICENSE.txt Too Init To Quit 2021-07-03 18:52:30 -05:00
links.json Added a link cache system to increase speed and cut way down on time spent downloading / hitting the twitter api call limit 2021-07-04 04:40:22 -05:00
readme.md updated the readme a bit 2021-07-03 20:21:22 -05:00
requirements.txt obligatory fix commit for the stuff I didn't get right the first time 2021-07-03 19:08:19 -05:00
twitfix.py fixed it for the /info/ path too 2021-07-04 16:54:23 -05:00

TwitFix

very basic flask server that fixes twitter embeds in discord by using youtube-dl to grab the direct link to the MP4 file and embeds the link to it in a custom page

This does work! but I'm new to flask, so it can probably be improved a great deal.

How to use (discord side)

just put the url to the server, and directly after, the full URL to the tweet you want to embed

I have a version running on my computer, I don't promise it'll be up all the time, but for now, you can use it by using the url http://twtfx.me/<twitter url>

How to run (server side)

this script uses the youtube-dl python module, along with flask, so install those with pip (you can use pip install -r requirements.txt) and start the server with python twitfix.py ( will need sudo if you leave it at port 80 )

By default I have the port set to 80, just cause that's what was convenient for me, but it can easily be changed, either using an environment variable, or changing the bottom line of the script itself

This project is licensed under the Do What The Fuck You Want Public License