Giter VIP home page Giter VIP logo

bettertwitfix's People

Contributors

abbeysside avatar adryd325 avatar cabiste69 avatar cbondurant avatar daisyuniverse avatar dangeredwolf avatar dependabot[bot] avatar doruksega avatar dylanpdx avatar fhrach4 avatar flifloo avatar izofeu avatar jackenmen avatar nekromateion avatar qtlunya avatar vocaned avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bettertwitfix's Issues

Combine all images into one

  • Combination of images code
  • Optimization of filesize/CPU usage
  • Serverless alternative to combine endpoint(?)

animation loops request

Hello, I'm not sure how hard this would be, the literal only "complaint" that I have for this site/code is that the kind of animations that I often see are about 1 to 6 seconds, and I would love to see an option to have them continually loop. Seems like a potential addition to links ending in mp4

Here is a wonderful example: https://twitter.com/Kekeflipnote/status/1584464315662602240

2023-13-08: Tweets not embedding

Investigating this issue where Tweets are not embedding properly.

So far, I have found that Twitter is returning an empty response when I ask for info about a Tweet

Failed to scan your tweet

As of today, no matter what tweet I try to post on discord with vx, I get the same error for all of them
Sem Título
This happens on every tweet

Error with pip install -r requirements.txt

I am getting the following error after trying to bring the containers up with docker compose up -d:

------
 > [deps 5/5] RUN pip install -r requirements.txt:
#0 2.270 ERROR: Could not find a version that satisfies the requirement pymongo==4.3.3 (from versions: 0.1rc0, 0.1.1rc0, 0.1.2rc0, 0.2rc0, 0.3rc0, 0.3.1rc0, 0.4rc0, 0.5rc0, 0.5.1rc0, 0.5.2rc0, 0.5.3rc0, 0.6, 0.7, 0.7.1, 0.7.2, 0.8, 0.8.1, 0.9, 0.9.1, 0.9.2, 0.9.3, 0.9.4, 0.9.5, 0.9.6, 0.9.7, 0.10, 0.10.1, 0.10.2, 0.10.3, 0.11, 0.11.1, 0.11.2, 0.11.3, 0.12, 0.13, 0.14, 0.14.1, 0.14.2, 0.15, 0.15.1, 0.15.2, 0.16, 1.0, 1.1, 1.1.1, 1.1.2, 1.2, 1.2.1, 1.3, 1.4, 1.5, 1.5.1, 1.5.2, 1.6, 1.7, 1.8, 1.8.1, 1.9, 1.10, 1.10.1, 1.11, 2.0, 2.0.1, 2.1, 2.1.1, 2.2, 2.2.1, 2.3, 2.4, 2.4.1, 2.4.2, 2.5, 2.5.1, 2.5.2, 2.6, 2.6.1, 2.6.2, 2.6.3, 2.7, 2.7.1, 2.7.2, 2.8, 2.8.1, 2.9, 2.9.1, 2.9.2, 2.9.3, 2.9.4, 2.9.5, 3.0, 3.0.1, 3.0.2, 3.0.3, 3.1, 3.1.1, 3.2, 3.2.1, 3.2.2, 3.3.0, 3.3.1, 3.4.0, 3.5.0, 3.5.1, 3.6.0, 3.6.1, 3.7.0, 3.7.1, 3.7.2, 3.8.0, 3.9.0, 3.10.0, 3.10.1, 3.11.0, 3.11.1, 3.11.2, 3.11.3, 3.11.4, 3.12.0, 3.12.1, 3.12.2, 3.12.3, 3.13.0, 4.0, 4.0.1, 4.0.2, 4.1.0, 4.1.1)
#0 2.270 ERROR: No matching distribution found for pymongo==4.3.3
------
failed to solve: process "/bin/sh -c pip install -r requirements.txt" did not complete successfully: exit code: 1
  • Ubuntu 22.04.2 LTS
  • pip 22.0.2
  • Python 3.10.6
  • Docker Compose version v2.16.0
  • Docker version 23.0.1

API media type animated_gif

The extended_entities json object would have these from the twitter api, would it be possible to maintain these so we can distinguish between these and video content on our side?

image

Add prepend-only support?

Hi! I use IFTTT in order to post tweets to a Discord channel via a webhook.

My issue is, IFTTT doesn't allow arbitrary rewriting of parameters without Pro+. The link to the tweet is provided as a parameter called {{LinkToTweet}} whose value is "https://twitter.com/Twitter/status/1492120137205526528" in its entirety. Because of this, there's no way to replace twitter with vxtwitter without a JS filter, which requires the highest subscription tier of IFTTT.

However, another option would be to prepend it like so: https://vxtwitter.com/{{LinkToTweet}} which would expand to "https://vxtwitter.com/https://twitter.com/Twitter/status/1492120137205526528". This currently generates a link that has a correct-looking embed, but clicking the link sends you to a redirect loop that eventually 400s. The redirects go:

...and so on. Can the nginx config be changed, please, to support this use case?

how to install for dummies

Not an issue, but but could you please provide the steps so someone like me, who has no linux knowledge, can deploy your bot on an ubuntu droplet?

Much appreciated if possible!

Extend description length

It appears that the embed description is trimmed to about 240 characters. It would be nice if this limit could be increased, maybe to 500 characters?

Twitter escaped HTML chars in API text

twitter would convert some chars like & > and < to their HTML-safe counterparts in tweet text as a security measure on itself or third party sites. Tweets that are embeded from the VNF data on BTF don't have this issue, but when fetched over the BTF API, then this issue starts to appear
https://github.com/dylanpdx/BetterTwitFix/blob/main/twitfix.py#L226

from the tweetdeck source, if it's easier to process these in code rather than fetching the expected text from the server

        var HTML_ENTITIES = {
            '&': '&amp;',
            '>': '&gt;',
            '<': '&lt;',
            '"': '&quot;',
            '\'': '&#39;'
        };

NSFW tagged tweets failed to scan

oh i meant posts, sorry!

This one for example:
vxtwitter.com/DiivesArt/status/1263259810818031616
image

I hope its fixable and not behind a paywall or anything.

Error scan link

At the moment https://vxtwitter.com/relativityspace/status/1532069087718699008 returns

HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Connection: keep-alive
Content-Encoding: gzip
Content-Type: text/html; charset=utf-8
Date: Wed, 01 Jun 2022 21:19:09 GMT
Server: nginx/1.18.0 (Ubuntu)
Transfer-Encoding: chunked

<!DOCTYPE html>
<html lang="en">
<head>
    
    <title>vxTwitter</title>
    <meta content="vxTwitter" property="og:title" />
    <meta content="Failed to scan your link! This may be due to an incorrect link, private account, or the twitter API itself might be having issues (Check here: https://api.twitterstat.us/)" property="og:description" />
    <meta content="https://github.com/dylanpdx/BetterTwitFix" property="og:url" />
    <meta content="#43B581"  name="theme-color" />
    <meta http-equiv = "refresh" content = "0; url = https://github.com/dylanpdx/BetterTwitFix" />

</head>
<body>
    
    You will be redirected to this projects github page in a moment. <a href="https://github.com/dylanpdx/BetterTwitFix">Or click here.</a>

</body>
</html>

Though https://twitter.com/relativityspace/status/1532069087718699008 is a valid, public, and active tweet, and https://api.twitterstat.us/ nor https://status.linode.com/ reports any issues. Other tweets like https://vxtwitter.com/CosmicalChief/status/1531994523156549635 results in correct embed

Tweet text as well as video in telegram?

Hey there
When using a vxtwitter link in telegram, it just shows the video, but not the text. Is it possible for it to show both the video and the text, or is this a limitation on telegram's side?
At the moment, I see a lot of folks posting a twitter link and a vxtwitter link, or posting the vxtwitter link and copy-pasting the caption into the message or whatnot.
An example:
image

Refactor code and VNF objects

I'd like to do some major refactoring and generally improve code readability, then lead into #20

  • New VNF object
    I'm looking at redesigning the VNF objects, mainly to support multi media uploads & newer twitter fields
    Currently I have something like this in mind
{
	"id": 12345,
	"text": "this is the tweet body",
	"media": [
		{
			"url": "https://pbs.twimg.com/media/aaaaaaa.jpg",
			"type": "image",
			"size": {
				"width": 1,
				"height": 1
			}
		},
		{
			"url": "https://pbs.twimg.com/media/xxxxxxx.mp4",
			"type": "video",
			"size": {
				"width": 1,
				"height": 1
			}
		},
		{
			"url": "https://pbs.twimg.com/media/yyyyy.gif",
			"type": "gif",
			"size": {
				"width": 1,
				"height": 1
			}
		}
	],
	"likes": 123,
	"nsfw": false,
	"pfp": "url",
	"qrtURL": null,
	"rts": 456,
	"views": 789,
	"replies": 555,
	"screen_name": "user",
	"time": "2023-07-06T12:26:39.000Z",
	"ttl": 1688800953,
	"uploaderName": "User",
	"verified": false,
	"poll": null
}

Possibly an "edited" field will be needed as well.
This will allow for embeds consisting of all one type (i.e all images) to be combined, and embeds of mixed types to support a /1, /2, /3, or /4 path

  • General code refactoring
    Code in general needs to be cleaned up. The cache/twExtract stuff was a good start but a lot is still a mess (my fault!)
    Templates specifically could use some rewrites to only take in the VNF object and use that in the template HTML

  • Other misc. things to consider

  • Removing the Cache system: NGINX Content Caching or CloudFront/CloudFlare can be used for this. This makes setup more of a pain, however

  • Remove user agent check: Again, could probably be handled by NGINX or CloudFlare, but improves setup complexity.

  • Embed changes: Moving around which fields display where in an embed. Only issue is Video embeds which don't show description in Discord

  • Separating README into separate pages (or a wiki?)

Tests using VNF objects will probably have to be changed

Other VX Services

Hello. I know this is the wrong place to ask but i couldn't figure out where to ask.
I saw you expanded the VX Service to TikTok and i was wondering if u planned to do it for 9GAG or Reddit aswell?

Greetings

Add a new url for X links?

The twitter app now gives me an x.com link when I copy from a tweet. fxtwitter has 'fixupx.com' . Could a second url be added so I don't need to type out vxtwitter every time?

Show multiple images without c.vx?

I habitually share stuff from twitter to various groups in telegram, and it's always a hassle when the tweet has multiple images in it. Recently Telegram has gotten super unreliant in embedding Twitter posts (either shows the post, shows just the text "[Twitter in some language] / Twitter", or fails to embed entirely) so I've had to use vx if there's a single image or c.vx if there's multiple. The problem is Telegram likes to lower the quality of images, even embedded ones, so the combined image gets shrunken down to the point where if there's text (like in a comic) you can't read any of it.

So my request is: Please find a way to show all images as separate image embeds in the same link? Discord will sometimes support it (mostly on desktop I think?) and Telegram used to support it as well, so it's definitely possible somehow.

Clickable links within embed

Would it be possible to make URLs clickable?

Currently the only way to open links from vxtwitter embeds is to copy that part of the text manually. This is ever less convenient on mobile because only the entire tweet text can be copied through click-and-hold. Blue-underlined URLs would be a great addition

vxtwitter links not redirecting to twitter links ("Bad Gateway")

Hello!

When I use vxtwitter links on Discord, the embed works great, but when I click the link, I'm no longer directed to the actual Twitter page. I get the error message "502 Bad Gateway".

I think this is a very recent issue! It wasn't like this before, so perhaps something broke down the pipeline.

Include Link to Account in Embed

While a niche use case, I use a browser plugin that highlights links of tweets and accounts that I have added to archival programs. The default twitter embed includes a link to the account page, so that link is detected and highlighted by the plugin. However the vxtwitter embed has a link to the post, which isn't always highlighted as the archival programs don't frequently check for new posts (every few days/weeks).

I see this as a bit redundant, as the same post link is directly above the embed. I think it could just be changed to the account link, or if supported by web embeds the author url parameter for discord could be used so the vxTwitter would link to the account. Either way would make the link highlighting work for this program and let users see if they have an account archived at a glance.

This is said plugin for reference, sorry for no screenshots. It integrates with the later two links. No support is directly needed for these, just changing the link to point to the account page will work. I included these to show that while niche, there's still an amount of people that could benefit from this change.
https://gitgud.io/prkc/hydrus-companion
https://gitgud.io/thatfuckingbird/hydownloader
https://github.com/hydrusnetwork/hydrus

vxtwitter embeds don't work on all mobile devices

When using vxtwitter in the discord app on my 2 Android phones, embeds don't work, when I hit the play button on the video, it still opens in the external web browser.

But I've asked some other people and for them it works properly, as it plays the video from the tweet straight in their discord app on their phones, be it on Android or iphone.

Any idea why is this happening and is there anything I can do to make it work as intended on my phones?

would be nice if it showed a play button for retweets of a video

consider the following: https://vxtwitter.com/EsemicolonR/status/1578189293024997377

A default twitter embed will show the retweeted video (but still not be able to play it properly), while vxtwitter will not show it at all and will oblige you to instead link to both the tweet and the retweeted tweet in order to get both the 'retweet' and also the retweeted video

it would be nice if it instead was able to show the retweeted video directly, mirroring what twitter itself is doing

Fix embedding Twitter links in Mastodon posts?

If this can be within the scope of this project... It's currently hit-or-miss whether a Twitter link will embed a preview correctly when sharing on Mastodon. And I presume other sites as well. I'm hoping the fediverse gains more traction, and if vxTwitter can be used the same way as on Discord, it could improve our ability to share.

rendercombined add unnecessary borders to the third image when combining two portrait and one landscape images

When combining three pictures, vxtwitter uses

+---+---+
| A | B |
+---+---+
|   C   |
+---+---+

arrangement. This is totally fine, and when image C is portrait it would fit-to-height just fine, but when it is landscape sometimes for some reason it isn't set as fit-to-window.

Example: https://convert.vxtwitter.com/rendercombined.jpg?imgs=https://pbs.twimg.com/media/F0BJpCgakAIxIUf.jpg,https://pbs.twimg.com/media/F0BJpCeaYAA-n9y.jpg,https://pbs.twimg.com/media/F0BJpCfaEAEB8mz.jpg

image

Text and account links are seemingly swapped

When clicking a vxtwitter embed, the link for the tweet text goes to the account user's page.

When clicking the name of the user, it goes to the specific tweet.

This is kinda backwards from what one would expect it to be, and I think it might be a bug?

(Android) Video downloads as a .bin

I just moved to android and so I know the issue is non existent on IOS but for some reason whenever I download a video it downloads as a .bin and I need to go into a file editor and manually change the extension to .mp4 to fix it, I dunno if there's any fix for it..

Cannot open http link

I can't open the http://vxtwitter.com/... link. It will give ERR_EMPTY_RESPONSE, and I need to manually change it to https to open the page. Tested on iOS Safari and Android Chrome. PC and Android Firefox can automatically jump to https and open the link however.

Votes didn't work

While fxtwitter can show vote results in Discord, vxtwitter and normal twitter can't do that at all.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.