Fix Twitter video embeds in Discord

Overview

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, with link caching

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 now have a copy of this running on a Linode server, you can use it via the following url

https://fxtwitter.com/

You can also simply type out 'fx' directly before 'twitter.com' in any valid twitter video url, and that will convert it into a working TwitFix url, for example:

example

Note: If you enjoy this service, please considering donating via Ko-Fi to help cover server costs

How to run (server side)

this script uses the youtube-dl python module, along with flask and pymongo, 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

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 by going into the script and change link_cache_system from json to "db", and inserting you mongoDB address, as having many workers writing to the same json file doesn't really work

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

Other stuff

Using the /info/<video-url> endpoint will return a json that contains all video info that youtube-dl can grab about any given video

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

Owner
Robin Universe
she/her โ˜† falling with style
Robin Universe
Powerful Telegram bot to countdown to your important events in any group chat.

Powerful Telegram bot to countdown to your important events in any group chat. Live countdown timer.

118 Dec 30, 2022
A library for demo trading | backtest and forward test simulation

Trade Engine a library for demo trading | backtest and forward test simulation Features Limit/Market orders: you can place a Limit or Market order in

Ali Moradi 7 Jul 02, 2022
Space Bot, a Discord bot built for HackerSpace Club of PES University

Space Bot Space Bot, a Discord bot built for HackerSpace Club of PES University What can Space Bot do? Space Bot allows you to lookup any mentor or to

HackerSpace @PESU 7 Oct 23, 2022
Telegram Remote Administration Tool

Telegram Remote Administration Tool DISCLAIMER | Telegram Remote Administration Tool can only be used at your PC. Do not be evil! ะงะธั‚ะฐะนั‚ะต ะฝะฐ ะ ัƒััะบะพะผ |

13 Nov 12, 2022
Coinbase Pro API interface framework and tooling

neutrino This project has just begun. Rudimentary API documentation Installation Prerequisites: Python 3.8+ and Git 2.33+ Navigate into a directory of

Joshua Chen 1 Dec 26, 2021
Recommended AWS CDK project structure for Python applications

Recommended AWS CDK project structure for Python applications The project implements a user management backend component that uses Amazon API Gateway,

AWS Samples 110 Jan 06, 2023
A simple, lightweight Discord bot running with only 512 MB memory on Heroku

Haruka This used to be a music bot, but people keep using it for NSFW content. Can't everyone be less horny? Bot commands See the built-in help comman

Haruka 4 Dec 26, 2022
SystemSix is an e-Ink "desk accessory" running on a Raspberry Pi. It is a bit of nostalgia that can function as a calendar, display the weather

SystemSix is an e-Ink "desk accessory" running on a Raspberry Pi. It is a bit of nostalgia that can function as a calendar, display the weather, the c

John Calhoun 372 Jan 02, 2023
A Chip-8 emulator written using Python's default libraries

Chippure A Chip-8 emulator written using Python's default libraries. Instructions: Simply launch the .py file and type the name of the Chip8 ROM you w

5 Sep 27, 2022
Interact and easily use Google Chat room webhooks.

Chat Webhooks Easily interact and send messages with Google Chat's webhooks feature. This API is small, but should be a nice framework for working wit

BD103 2 Dec 13, 2021
TgMusicBot is a telegram userbot for playing songs in telegram voice calls based on Pyrogram and PyTgCalls.

TgMusicBot [Stable] TgMusicBot is a telegram userbot for playing songs in telegram voice calls based on Pyrogram and PyTgCalls. Commands !start / !hel

KรผrลŸad 21 Dec 25, 2022
This bot will send you an email or notify you via telegram & discord if dolar/lira parity breaks a record.

Dolar Rekor Kฤฑrdฤฑ Mฤฑ? This bot will send you an email or notify you via Telegram & Discord if Dolar/Lira parity breaks a record. Mailgun can be used a

YiฤŸit GรถktuฤŸ Budanur 2 Oct 14, 2021
Discord bot that displays the current Swatch Internet Time (.beat) as a status.

Internet-Time-Display Discord bot that displays the current Swatch Internet Time (.beat) as a status. Visit the website! Add the bot to your server! A

2 Mar 15, 2022
A simple library for interacting with Amazon SQS.

qoo is a very simple Amazon SQS client, written in Python. It aims to be much more straight-forward to use than boto3, and specializes only in Amazon

Jacobi Petrucciani 2 Oct 30, 2020
Docker image for epicseven gvg qq chatbot based on Xunbot

XUN_Langskip XUN ๆ˜ฏไธ€ไธชๅŸบไบŽ NoneBot ๅ’Œ ้…ทQ ็š„ๅŠŸ่ƒฝๅž‹QQๆœบๅ™จไบบ๏ผŒ็›ฎๅ‰ๆไพ›ไบ†้Ÿณไน็‚นๆ’ญใ€้ŸณไนๆŽจ่ใ€ๅคฉๆฐ”ๆŸฅ่ฏขใ€RSSHub่ฎข้˜…ใ€ไฝฟ็”จๅธฎๅŠฉใ€่ฏ†ๅ›พใ€่ฏ†็•ชใ€ๆœ็•ชใ€ไธŠ่ฝฆใ€็ฃๅŠ›ๆœ็ดขใ€ๅœฐ้œ‡้€ŸๆŠฅใ€่ฎก็ฎ—ใ€ๆ—ฅ่ฏญ่ฏๅ…ธใ€็ฟป่ฏ‘ใ€่‡ชๆˆ‘ๆฃ€ๆŸฅ๏ผŒๆƒ้™็ญ‰็บงๅŠŸ่ƒฝ๏ผŒ็”ฑไบŽๆ˜ฏไธบไบ†ๅฎŒๆˆ่‡ชๅทฑๅœจ็พค้‡Œ็š„ๆ‰ฟ่ฏบ๏ผŒไธ€ๆ—ถๅ…ด่ตทๆ‰ๅš็š„๏ผŒๆ‰€

Xavier Xiong 2 Jun 08, 2022
Discord Rich Presence for Team Fortress 2

TF2 Rich Presence Discord Rich Presence for Team Fortress 2 Detects current game state, queue info, playtime, and more Configurable, reliable, and per

Kataiser 33 Dec 31, 2022
Previewer for VapourSynth scripts.

Standalone previewer for VapourSynth scripts Fork of Endilll's vapoursynth-preview (not maintained anymore) This program is meant to be paired with a

Irrational Encoding Wizardry 26 Dec 16, 2022
Python Proof of Concept for retrieving Now Playing on YouTube Music with TabFS

Youtube Music TabFS Python Proof of Concept for retrieving Now Playing on YouTube Music with TabFS. music_information = get_now_playing() pprint(music

Junho Yeo 41 Nov 06, 2022
Wrapper for wttr.in weather forecast.

pywttr Wrapper for wttr.in weather forecast. Asynchronous version here. Installation pip install pywttr Example This example prints the average temper

Almaz 6 Dec 25, 2022