-
Notifications
You must be signed in to change notification settings - Fork 627
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
Redgifs error #1994
Comments
Hello @Ihatetotank, Can you please provide the post link instead of the redgifs link? The redgifs link is broken |
Try this: https://www.reddit.com/r/stripgirls/comments/x3jl6p/dripping_wet_for_you/ Links to https://redgifs.com/watch/meekidiotickatydid RipMe logged the link as: https://thumbs4.redgifs.com/MeekIdioticKatydid-mobile.mp4?expires=1662076800&signature=6b0bd38c8f9433b4ea376ac90ed3a5de9c455a0052db33ed59da6aafcd1a1eca&for=xx.xx.xx.xx Errors with: Query string parameter signature is missing. |
Update: Viewing the source, it looks like the actual MP4 is this URL: Compared to the RipME URL: Obviously different signature and missing the #t=0 |
I think it's mostly the https://api.redgifs.com/v2/gifs/meekidiotickatydid?views=yes&users=yes the urls don't have |
the problem is the code is finding the I found out that they need you to register for Bearer tokens. The bearer token for their web app is just:
which if the base64 of with {"typ":"JWT","alg":"HS256"}{"iss":"1823c31f7d3-745a-6589-0005-d8e8fe0a44c2","exp":1663677321,"sub":"client\/1823c31f7d3-745a-6589-0005-d8e8fe0a44c2","scopes":"read","rate":-1} |
So what does that mean for the future of ripping RedGifs with RipMe? Is there a way to edit it so it works with the new API? |
I'm new to this project, I'll try opening a PR to help fix this. It will work, yes |
I'm having the same problem. What's the solution? |
The Current CI's are failing, I don't thing the source code is in a working condition yet. https://github.com/RipMeApp/ripme/actions I'll open a PR once the source code is fixed Edit: |
Well, thanks. Keep me updated. |
There is some discussion on a solution here https://www.reddit.com/r/DataHoarder/comments/x67zfo/redgifs_api_now_blocked_from_hotlinking_anyone/ |
This is great info!
…On Mon, Sep 12, 2022, 7:28 PM Zemur11 ***@***.***> wrote:
There is some discussion on a solution here
https://www.reddit.com/r/DataHoarder/comments/x67zfo/redgifs_api_now_blocked_from_hotlinking_anyone/
—
Reply to this email directly, view it on GitHub
<#1994 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFKM43EY3QTBAB2QFWAO2HTV57REPANCNFSM6AAAAAAQCORWYQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@CypherpunkSamurai Try it at the fork instead, main is dead -> https://github.com/ripmeapp2/ripme |
I just checked and contrary to the reddit post, the token I used is still working. Try here Also even if it won't work we know how to create tokens (as mentioned above), we can just create one on the fly without any account. I think this would work. Will draft a PR soon cool 👍🏼 |
Thank you @CypherpunkSamurai ! |
Correction. The token seems to be a JWT so we require a key to create jwt. Also the webui uses a client id, but i cant find the secret, so we are left to finding the token. The token can be located in https://www.redgifs.com/assets/js/index.0a3f050b.js if you find |
@CypherpunkSamurai the token cannot be created! It is updated on every request! Cookies are valid for a very short term. The bearer token refreshes every request.
Okay but where do you propose to find these credentials? In
the middle part is |
Yeah figured that out in the last comment, lol.
when you load the redgifs webpage, right click and view-source. you will find a
What is the solution you ask? |
I can't find the token in this file.
Can you write this regex here?
Excuse me, but where? Maybe I missed something?
I'm confused... So is there a solution or not? |
I was kinda busy, I can't complete rewriting the whole module. public static void getToken() throws IOException {
LOGGER.info("Fetching AUTH_TOKEN for " + HOST);
//String i = "index.0a3f050b.js";
String i = "";
if (AUTH_TOKEN != "") {
LOGGER.info("AUTH_TOKEN already exists. AUTH_TOKEN is " + AUTH_TOKEN);
return;
}
// Fetches AUTH_TOKEN for future requests
Document h = Http.url("https://" + HOST).ignoreContentType().get();
Matcher hm = Pattern.compile(".*(index.*?js).*", Pattern.DOTALL).matcher(h.toString());
if (hm.matches()) {
i = hm.group(1);
} else {
return;
}
// Read Token
Document j = Http.url("https://www." + HOST + "/assets/js/" + i)
.header("User-Agent", "Mozilla (Webkit)")
.header("Referer", "https://" + HOST)
.ignoreContentType()
.get();
Matcher jm = Pattern.compile(".*(eyJ0.*?\").*", Pattern.DOTALL).matcher(j.toString());
if (jm.matches()) {
AUTH_TOKEN = jm.group(1).replace("\"", "");
LOGGER.info("Authtoken: " + AUTH_TOKEN);
} else {
return;
}
} |
Thanks for your time. I also need time to test your code.
If the token is refreshed on every request, then the request to get the token also cause to the token to be refreshed? |
Actually I really doubt that this bearer token is a required credential (at least basic once). It is not possible to work with a token that is updated on every request. It doesn't make sense. If the token is refreshed on every request, the request to get token will cause the token to be refreshed. So in this case you will need to ask the site for a new token, which will cause the token to be refreshed again. If the token is valid for a particular file signature, it's impossible to support that many "token-signature" connections. I think there is something "key" that allows you bypass authorization. But I don't know what exactly. |
Hm... RedGifs seems to still work. RedGifs media posted on Reddit download without problems. The authorization error only occurs when loading a RedGifs profile. |
If you notice That's cause it will be fetched only once. I'm yet to rewrite the whole module, as the regex don't work, the jsoup extractors don't work, and it's confusing. |
Reddit has 1st class support, reddit json contains direct links to mp4 and fallback urls most of the times. |
Document |
Using older API bypasses authentication. Reddit I think is still using old API. The new V2 api requires client to be valid. |
No, it is. It's updated on every profile and/or post request.
I didn't see RedGifs mp4 in Reddit responses.
and
What's that supposed to mean? If you don't have a solution, why did you post here as if you fixed something?!
Again. I didn't see RedGifs mp4 in Reddit responses. My program parses RedGifs URLs posted on Reddit using the RedGifs v2 API! I posted a particular request that doesn't work. Requests to get posts are working fine. |
Hi Andy, please check that the api i mentioned and reverse engineered is atleast a few months old, their api changed drastically. Even your program has got broken because of it. I shared what i found here for future reference. If you can rewrite the module yourself in java be my guest :D |
All RedGifs parsers broke when they did that.
Did you even see what you wrote? You posted the code and a few messages later said that your regex doesn't work anymore, your code doesn't work... What should I test if you post broken things?! I'm having trouble getting an array of user data. A specific post can still be parsed using cookies and a token ( |
By all you mean your parser broke, cause i didn't see anyone using the v2 api with token recently. Until the reddit post, and until someone mentioned this issue in your repo
The existing repo code (latest commit) doesn't work anymore, not my code. You missing context awareness.
Instead of shouting in other's repo issue you should try learn java and write this module yourself i guess. |
My program works with token and v2 API. It just can't get a list of user's post. But with a specific post it works! |
This isn't a matter of "My Program works, your don't". That's just being toxic teenager online. If you've figure it all out, great. Congratulations. Now feel free to learn java and contribute instead of showing off. Thank you, |
The conversation is off. You don't see what you wrote. You don't see what I wrote. Where is toxic? I said where is the problem (in getting a list of user posts). You are a spammer or a troll. P.S. I won't learn java to write code for you. Feel free to learn Visual Vasic or C#! |
Coming over to another repo to show off your program is superiour is what a toxic teenager would do. As i said, this is an opensource project, instead of shilling "I fixed it before you guys" you can contribute. If you can't contribute maybe you should not speak on another repo's issue where no one tagged you and asked your opinion. Also, P.S. I don't need to learn C#, VB 2006, VB.Net and WPF again to prove my point, as i've learnt it in 2015. Thank you for suggestion, I don't consider your opinions valuable in this thread. |
FWIW, there seems to be a notion of "temporary tokens" now, as documented in https://github.com/Redgifs/api/wiki/Temporary-tokens The token provided in the response, is then used as the At least in old Reddit UI, that's what it is doing too. |
Yes, I just checked yesterday, the javascript embedded token is no more there. It seems they updated their backend and have a new api endpoint for temporary tokens. The redgifs v1 api url now returns route not found. It's completely deprecated now. Their swagger ui have updated too This temporary endpoint provides a different kind of jwt, here's the jwt decoded. Not only did they add issue at time (iat), and token exp time, but also the client ip. Solutions |
Yea, at one point they were already using the IP address and user agent to generate the token. Only reference I found about this is in https://old.reddit.com/r/StellarOSX/comments/x3iddd/regarding_redgifs_and_your_privacy_next_update/ This is more or less an extra info, since I made a personal proxy to RedGifs. All the media URL returned now have a |
Looks like @SpartanJ was able to fix it in a different project |
I hope they have completed making changes to their APIs and it's stable now. need to confirm beforehand, or we run into problems like before |
Ripping Redgifs produces an error: Query string parameter signature is missing. The xx.xx.xx.xx is masked external IP address
Expected Behavior
Expected it to download the MP4
Actual Behavior
Detail the actual (incorrect) behavior here. You can post log snippets or attach log files to your issue report.
Seems the query string may have changes, all Redgifs links error in the same way
The text was updated successfully, but these errors were encountered: