Closed TarybleTexan closed 2 months ago
i don't even know if this program is still being developed. its been like 4 months with no activity.
I think @soloturn was the one who was developing it, but I haven't seen him comment on issues in a while
this is open source, so anybody can create a commit and it automatically builds a new version :)
this is open source, so anybody can create a commit and it automatically builds a new version :)
I wish i had the programming skills to do something like that, but alas I don't.
I'll see if I can patch it. Though I am junk at following through. I also haven't opened my github desktop or ms code in over half a year i think.
Don't bother - they've completely killed the ability to download videos via deep link. It takes a lot more correction now than when I created the ticket.- T. J. SpackmanSent from mobile, apologies for typosOn Oct 20, 2022, at 5:16 PM, MegaManZero @.***> wrote: I'll see if I can patch it. Though I am junk at following through. I also haven't opened my github desktop or ms code in over half a year i think.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>
So its not that hard to fix. Note that my particular use case is scraping Reddit, which does not make use of the Redgifs API
Instead of contentUrl, use the content value of the first tag. (The page usually has 2. The second one seems to always be for mobile. For robustness you could probably scrape both and then use the non-mobile one). If only one such tag exists and it is a mobile URL that means there is no HD version.
Replace all &
in the URL with &
Other than that, you don't do anything else to the URL. Removing "-mobile" from it, invalidates the signature.
The requests to www.redgifs.com and thumbs4.redgifs.com MUST be from the same IP address (And therefore IP protocol version). Unless you force IPv4 or IPv6 for both requests, it is possible for one to use IPv4 and the other to use IPv6, which invalidates the URL signature.
Both requests MUST use the exact same user agent. Currently it can be set to anything, just as long as it's the same for both requests.
6. For some reason (at least in my testing), both requests MUST use HTTP/2. If either one uses HTTP/1.1 then the download will fail. See below for workaround.
If all of these are enforced then you can successfully download the video.
Here is a really terrible bash one liner that works for me on macOS (using bash) as a proof of concept.
curl -4 -v "https://www.redgifs.com/watch/INSERT_VALID_VIDEO_ID_SLUG_HERE?r=$RANDOM" | sed 's_<_|<_g' | tr '|' '\n' | fgrep ".mp4" | head -n 1 | cut -d '"' -f 4 | sed 's_\&_\&_g' | xargs -n 1 -I {} curl -v -O -4 "{}"
EDIT: I added the semi colon ";" to the sanitize function and I get a 403 instead of a 400 http error code now so that's progress i think. No idea where those semi colons are coming from i'll have to look around.
Does anyone know if these semi colons matter? I don't see them in the browser URL but in the logger code ive added they are in the URL string. I added *** incase the sig is unique to me or something.
https://thumbs4.redgifs.com/GloomyCorruptLabradorretriever.mp4?expires=1666983600&;signature=**0076d98a22bfcec0322d68a6f0**********384bf060a4efaa152686e937**&;for=MYIPADDRESS : Non-retriable status code 400 while downloading
I am wondering if they are messing the redgif download or they are normal in java url code? As you can see I've gotten rid of amp adding to and using the sanitizeurl function.
Oh I got that URL in this topic to work, I had to get rid of the code that deleted the "-mobile" tag
Though I guess this means no HD unless I can figure that out.
is there still no fix for this? :(
It was working for a while after an update, but now it's back to giving 403 errors.
Ripme version: 2.1.2-3-ea90b172
Java version: java version "11.0.16" 2022-07-19 LTS Java(TM) SE Runtime Environment 18.9 (build 11.0.16+11-LTS-199) Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.16+11-LTS-199, mixed mode)
Operating system: Microsoft Windows 11 [Version 10.0.22000.856]
Exact URL you were trying to rip when the problem occurred: https://www.redgifs.com/watch/gloomycorruptlabradorretriever
Please include any additional information about how to reproduce the problem: Download any URL that leads to downloading a RedGIFs video.
Expected Behavior
Should download the video.
Actual Behavior
Download fails. RedGIFs changed their download system to add several tokens to the end of the url. However, stripping off everything in the video URL after "mp4", and then replacing "thumbs4" with "thumbs3", should work.
Logs from the app window log are below.
Logs from the log file are below.