Giter VIP home page Giter VIP logo

Comments (24)

dylanpdx avatar dylanpdx commented on June 10, 2024 1

I sent you an email earlier regarding this issue but I'm fine with discussing it here henceforth

Oh, your email got sent to spam, I'm so sorry I wasn't able to see it! I'm fine discussing this here from now on

vxTwitter is hosted in the US, so they probably rolled that change out today to that region. I guess switching regions could work, but since Discord's link unfurler servers are also in the US it would probably add latency, and not to mention that Twitter has a high chance of switching it off there as well

How I see it at the moment, there's no way to get info about NSFW tweets using any public API, authentication is required. Both v1.1 and v2 API versions return a 404, as do the internal API's like the GraphQL and cdn.syndication.twimg.com. There might be another obscure public API out there but I haven't been able to find anything regarding that.

Overall a pretty upsetting change but I can see the reasoning behind it. This may be related to the new API pricing as well since it went into effect just recently

from bettertwitfix.

Scrxtchy avatar Scrxtchy commented on June 10, 2024 1

I have never felt as much solidarity in this commit 6244c87 anywhere else before in programming

image

from bettertwitfix.

Nama avatar Nama commented on June 10, 2024

This should happen only on some NSFW tweets.

Twitter changed their API restrictions and doesn't allow access to some NSFW tweets.

from bettertwitfix.

Ashuraman666 avatar Ashuraman666 commented on June 10, 2024

This should happen only on some NSFW tweets.

Twitter changed their API restrictions and doesn't allow access to some NSFW tweets.

Is there any way to know which NSFW tweets it blocks and which it doesn't?

from bettertwitfix.

dylanpdx avatar dylanpdx commented on June 10, 2024

Can I have an example of a non-working tweet so I can add it to my tests?

Edit: Was able to find one

from bettertwitfix.

dylanpdx avatar dylanpdx commented on June 10, 2024

It seems like Twitter is returning 404 (Not found) for some tweets, with a message of "Sorry, that page does not exist."
I'm not sure if this is intentional or as a result of some API limit. I'd expect another error code if this was an API limitation

from bettertwitfix.

Ashuraman666 avatar Ashuraman666 commented on June 10, 2024

It seems like Twitter is returning 404 (Not found) for some tweets, with a message of "Sorry, that page does not exist." I'm not sure if this is intentional or as a result of some API limit. I'd expect another error code if this was an API limitation

Here's the thing, I tried the same tweets with a different tweet fix (The one where you replace the i in Twitter with an x) and that one did work

from bettertwitfix.

dylanpdx avatar dylanpdx commented on June 10, 2024

I have a possible workaround in the works, although I'm not sure how long before Twitter blocks that too

from bettertwitfix.

dylanpdx avatar dylanpdx commented on June 10, 2024

I've deployed a fix, please double check that the issue is fixed.

It's not a perfect fix since it can fail at times, but this is the most I can do as a temporary patch

from bettertwitfix.

Ashuraman666 avatar Ashuraman666 commented on June 10, 2024

I've deployed a fix, please double check that the issue is fixed.

It's not a perfect fix since it can fail at times, but this is the most I can do as a temporary patch

Seems to be working for images for the most part but for videos it still gives the same "Tweet not found" error

from bettertwitfix.

dylanpdx avatar dylanpdx commented on June 10, 2024

Might be due to Discord's caching of some links, it should start updating them in around 30 minutes or so
Workaround at the moment is to somehow change the URL so that Discord fetches a fresh copy, adding ?a at the end usually works

from bettertwitfix.

Scrxtchy avatar Scrxtchy commented on June 10, 2024

It seems like Twitter is returning 404 (Not found) for some tweets, with a message of "Sorry, that page does not exist."

This is the standard error for adult-restricted tweets via the 1.1 api, you'll get these if you're account isn't old enough for adult content
image
image

from bettertwitfix.

Scrxtchy avatar Scrxtchy commented on June 10, 2024

Is there any way to know which NSFW tweets it blocks and which it doesn't?

Twitter store a possibly_sensitive as a part of a Tweet object in the json, if this is true, you'll get the error, opening a tweet in a private tab/logged out is a good way to tell since with this change twitter should be restricting Adult Restricted tweets in your region. It has been restricted in Australia for some time already

from bettertwitfix.

dylanpdx avatar dylanpdx commented on June 10, 2024

It seems like Twitter is returning 404 (Not found) for some tweets, with a message of "Sorry, that page does not exist."

This is the standard error for adult-restricted tweets via the 1.1 api, you'll get these if you're account isn't old enough for adult content image image

In the past, I seem to remember it returning a message similar to what Twitter shows while logged out
image
but I might be mis-remembering. Either way, this makes it annoying to check if a tweet simply doesn't exist or is just age restricted. Some other 4XX error (403?) would probably be more informative.

I also noticed that this change affected a lot of Twitter's own tools as well, i.e https://publish.twitter.com fails for NSFW tweets.

I'm still unsure if this was a deliberate change or some mistake...

from bettertwitfix.

Scrxtchy avatar Scrxtchy commented on June 10, 2024

In the past, I seem to remember it returning a message similar to what Twitter shows while logged out

No, that's the one,
This is the error you get when logged in
image

Not important to the issue, but I made a thread about my experience with it. I sent you an email earlier regarding this issue but I'm fine with discussing it here henceforth, now that we have a better understanding. But my understanding is that this seems like an intentional change

I also noticed that this change affected a lot of Twitter's own tools as well, i.e https://publish.twitter.com fails for NSFW tweets.

at least the error message here is a lot more meaningful, the api also is used on tweetdeck without leaving the page, it's just weird seeing an api controller on the platform.twitter.com domain
23-04-09_06-58-38-Developer_Tools_—_()TweetDeck—_httpstweetdeck tw

from bettertwitfix.

Delphox avatar Delphox commented on June 10, 2024

Yea I can confirm it's not working for videos. Here's an example for a video that fails (its not NSFW but gets detected as such): https://vxtwitter.com/TheFunny_mp4/status/1529475039833337858

from bettertwitfix.

dylanpdx avatar dylanpdx commented on June 10, 2024

Looking into it - Thanks for the example tweet

from bettertwitfix.

dylanpdx avatar dylanpdx commented on June 10, 2024

This should be fixed now- Keep in mind Discord might take a while to refresh their link cache (usually up to 30 minutes)

from bettertwitfix.

Scrxtchy avatar Scrxtchy commented on June 10, 2024

I deleted my earlier post since I misread the comment, apologies

from bettertwitfix.

Delphox avatar Delphox commented on June 10, 2024

That was quick, thanks! Just one small issue, some of those videos are embedding super tiny. Here's another example tweet: https://vxtwitter.com/NightShiftNyx/status/1598396995877699602 (also not NSFW but detected as such, but keep in mind this one is from a NSFW account)

from bettertwitfix.

dylanpdx avatar dylanpdx commented on June 10, 2024

This should now be fixed as well! Sorry about that, my mistake

from bettertwitfix.

dylanpdx avatar dylanpdx commented on June 10, 2024

My brain is currently at half capacity haha, I'll (hopefully) put in a cleaner fix for this when I can, and maybe add some test cases for it as well

from bettertwitfix.

Delphox avatar Delphox commented on June 10, 2024

Doesn't seem like the last fix worked... NSFW embeds are still small, including the last example one. I tried the ?a trick to make sure.

from bettertwitfix.

Delphox avatar Delphox commented on June 10, 2024

Oh nevermind I tried changing the username in the url instead and it actually forced Discord to re-fetch it and it's fixed. So it was discord's cache messing it up and just adding ?aaa at the end isn't enough to force a true refetch. Thanks again!

from bettertwitfix.

Related Issues (20)

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.