Updates and changes

Signed-off-by: Chloe Carver-Brown <admin@twxtter.com>
This commit is contained in:
Chloe Carver-Brown 2022-05-18 15:24:27 +01:00
parent 5b58c0d9bc
commit ef42c26a81
No known key found for this signature in database
GPG Key ID: 71938715093BE620
9 changed files with 605 additions and 336 deletions

38
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View File

@ -0,0 +1,38 @@
---
name: Bug report
about: Create a report to help us improve
title: "[BUG]"
labels: bug
assignees: ''
---
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
**Additional context**
Add any other context about the problem here.

View File

@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: "[FEATURE REQUEST]"
labels: enhancement
assignees: ''
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.

7
.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,7 @@
{
"python.linting.flake8Enabled": true,
"python.linting.enabled": true,
"python.linting.flake8Args": [
"--ignore=E501, E261, E302, E231, E226, F401, E221, W503, E722, E711, E712, F841",
],
}

View File

@ -1,54 +1,18 @@
# TwitFix
# Twxtter/sixFix
(A fork of 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. This also automatically embeds the first link in the text of non video tweets (API Only)
Regarding what happened to TwitFix: http://blog.hirob.in/2022-05-16-Goodbye-TwitFix/
## 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/[twitter video url] or [last half of twitter url] (everything past twitter.com/)
https://twxtter.com/[twitter video url] or [last half of twitter url])
```
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:
You can also simply type out `s/i/x` on PC and iOS after sending a twitter link to discord, and it will edit the last message (The link) to replace the first i with x.
![example](example.gif)
**Note**: If you enjoy this service, please considering donating via [Ko-Fi](https://ko-fi.com/robin_universe) to help cover server costs
## Child Projects:
[TwitFix-Bot](https://github.com/robinuniverse/TwitFix-Bot) - A discord bot for automatically converting normal twitter links posted by users into twitfix links
[TwitFix-Extension](https://github.com/robinuniverse/TwitFix-Extension) - A browser extention that lets you right click twitter videos to copy a twitfix link to your clipboard
# Monthly Contributors
TwitFix is run for free, period, I have no plans to monetize it directly in any way ( no ads, no premium accounts with more features ) so I rely on donations to keep TwitFix running, and I have created the option to [donate on a monthly basis using my KoFi](https://ko-fi.com/robin_universe#tier16328580186740)
Here's a a list of the people who help to keep this project alive! ( current total monthly - $49!!! )
1. [$3] First Contributor and Twitter Funnyman **Chris Burwell** ( [@countchrisdo](https://twitter.com/countchrisdo) on Twitter )
2. [$9] Previously highest Contributor, Suspciously wealthy furry, and a very loving friend **Vectrobe** ( [@Vectrobe](https://twitter.com/Vectrobe) on Twitter )
3. [$10] New highest monthly contributor, **helloitscrash**!
4. [$6] A Mysterious and **Anonymous** contributor...
5. [$10] One of the highest contributors, **Ryan Vilbrandt**!
6. [$3] **Starcat13**, the one with the coolest sounding name
7. [$5] THE LIGHT THROUGH WHICH GOD SPEAKS TO THIS EARTH: **Statek**
8. [$3] **Impulse**, probably the source cheat
9. [$3] a STRONG contendor for coolest name, "**Lost in Art & Magic**"
**Note**: If you enjoy this service, please considering donating via [Ko-Fi](https://ko-fi.com/twxtter) to help cover server costs
## How to run (server side)
@ -58,7 +22,7 @@ I have included some files to give you a head start on setting this server up wi
### Config
TwitFix generates a config.json in its root directory the first time you run it, the options are:
Twxtter generates a config.json in its root directory the first time you run it, the options are:
**API** - This will be where you put the credentials for your twitter API if you use this method
@ -90,13 +54,19 @@ This project is licensed under the **Do What The Fuck You Want Public License**
## Other stuff
Going to `https://fxtwitter.com/latest/` will present a page that shows the all the latest tweets that were added to the database, use with caution as results may be nsfw! Current page created by @DorukSaga
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
## Other stuff
Going to `https://twxtter.com/latest/` will present a page that shows the all the latest tweets that were added to the database, use with caution as results may be nsfw! Current page created by @DorukSaga
Using the `/dir/<video-url>` endpoint will return a redirect to the direct MP4 link, this can be useful for downloading a video
Using the `/dl/<video-url>` or appending a `.mp4` will make the server download the video and return a static, locally hosted copy
Using the subdomain `d.fxtwitter.com/<video-url>` will redirect to a direct MP4 url hosted on Twitter
Using the subdomain `d.twxtter.com/<video-url>` will redirect to a direct MP4 url hosted on Twitter
Using the `/info/<video-url>` endpoint will return a json that contains all video info that youtube-dl can grab about any given video
@ -108,6 +78,7 @@ Using `/api/top/` will return a json with the most hit tweet in the database. Ta
Using `/api/stats/` will return a json with some stats about TwitFix's activity (embeds, new cached links, API hits, downloads). Takes param `?=date"YYYY-MM-DD"` to return a specific day, otherwise will return today's stats to far
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
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://twxtter.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
# NOTICE
## This is _**NOT**_ actively monitored by anyone working on Twxtter. All tweets are public ally accessible.

BIN
static/coconut.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

@ -4,7 +4,7 @@ module = wsgi:app
master = true
processes = 5
socket = twitfix.sock
socket = sixFix.sock
chmod-socket = 660
vacuum = true

File diff suppressed because it is too large Load Diff

View File

@ -2,4 +2,4 @@ from twitfix import app
if __name__ == "__main__":
# listen on 0.0.0.0 to facilitate testing with real services
app.run(host='0.0.0.0')
app.run(host="0.0.0.0")