Added automatic link redirecting for t.co links in non video tweets when using the API

This commit is contained in:
robinuniverse
2021-07-14 19:15:06 -05:00
parent f3f62f3cb4
commit 5567498a20
3 changed files with 27 additions and 14 deletions

View File

@ -1,6 +1,6 @@
# TwitFix
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
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. This also automatically embeds the first link in the text of non video tweets (API Only)
## How to use (discord side)
@ -63,3 +63,5 @@ Using the `/info/<video-url>` endpoint will return a json that contains all vide
Using `/other/<video-url>` will attempt to run the twitter embed stuff on other websites videos - This is mostly experimental and doesn't really work for now
Advanced embeds are provided via a `/oembed.json?` endpoint - This is manually pointing at my server in `/templates/index.html` and should be changed from `https://fxtwitter.com/` to whatever your domain is
We check for t.co links in non video tweets, and if one is found, we direct the discord useragent to embed that link directly, this means that twitter links containing youtube / vimeo links will automatically embed those as if you had just directly linked to that content