Skip to content

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
@DieTL95
Copy link

DieTL95 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