Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix redgif host video and images #5481

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

yereter
Copy link

@yereter yereter commented Oct 19, 2023

Don't have much js or extension development experience, I tried to stick to the general structure of the code as much as I could, tell me if I did anything wrong... The python developer inside me could have surfaced here and there and mixed conventions between the languages.

I couldn't make a request to redgif API without the permissions (CORS error) so based on project documentations I added it to "manifest.json", although the documentation gave "api.twitter.com" as an example which doesnt really appear in the manifest anymore, I think the documentations might need a little update.

Relevant issue: fixes #5468
Tested in browser: Firefox, Chrome, Vivaldi

uwx added a commit to uwx/Reddit-Enhancement-Suite that referenced this pull request Nov 13, 2023
@TheMrGhost
Copy link

TheMrGhost commented Dec 6, 2024

I know this is a bit old, and I don't really care for redgifs but I was familiar with gfycat's api and as I'm learning coding again thought this might be a good practice.

So both the token and gif url have a stringifying code that is python, I dk if that worked before but it's broken now but thats a very simple fix
const authUrl = encodeURI("https://api.redgifs.com/v2/auth/temporary").ToString()

url: encodeURI("https://api.redgifs.com/v2/gifs/${id}").ToString()

But that's the easy part, since redgifs seem to have changed something about their API that prevents "Hotlinking" and you get an HTTP 403 error, even tho console logging the fetched data, and directly opening the video link works, but right-clicking the fetched link in the RES expando shows the "Hotlinking disabled" message.

I'm mainly trying to understand this error, why it's happening and how it could be fixed from a coding perspective.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Broken expando for domain i.redgifs.com (NSFW)
2 participants