-
-
Save mmpx12/9364f8f9665efade3661a4cf07ae39df to your computer and use it in GitHub Desktop.
| #!/usr/bin/bash | |
| function GetVideos(){ | |
| username="$1" | |
| page=0 | |
| while true; do | |
| a=($(curl -s "https://leakedzone.com/$username?page=$page&type=videos&order=0" \ | |
| -H 'X-Requested-With: XMLHttpRequest' | \ | |
| jq -r '.[]|(.slug + "/" + .stream_url_play)')) | |
| n=0 | |
| [[ "${#a[@]}" -eq 0 ]] && return | |
| for i in "${a[@]}"; do | |
| slug="$(cut -d "/" -f1 <<< "$i")" | |
| path="$(cut -d "/" -f2 <<< "$i")" | |
| url="$(echo -n "$path" | cut -c17- | rev | cut -c17- | base64 -d)" | |
| yt-dlp "$url" -o "videos/$slug.%(ext)s" > /dev/null | |
| echo -ne "\rpage: $page, video: $n/${#a[@]} " | |
| ((n++)) | |
| done | |
| ((page++)) | |
| done | |
| } | |
| function GetPhotos(){ | |
| username="$1" | |
| page=0 | |
| while true; do | |
| a=($(curl -s "https://leakedzone.com/$username?page=$page&type=photos&order=0" \ | |
| -H 'X-Requested-With: XMLHttpRequest' | jq -r '.[].image')) | |
| [[ "${#a[@]}" -eq 0 ]] && return | |
| n=0 | |
| for i in "${a[@]}"; do | |
| wget -qP photos "https://leakedzone.com/storage/$i" | |
| echo -ne "\rpage: $page, image: $n/${#a[@]} " | |
| ((n++)) | |
| done | |
| ((page++)) | |
| done | |
| } | |
| GetPhotos "$1" | |
| GetVideos "$1" |
Ok, I realised that yt-dlp won't add support for LeakedZone because they don't support copyrighted material..
Instead, I've modified the script to download all the individual parts in that file I get using curl. Then go through each of the links, download them (using yt-dlp, which still seems to work - although could probably use curl for that as well?), and then merge them together using ffmpeg.
Seems to be working just fine!
Sorry @john-peterson, but I don't have Firefox, and don't want to download and install that just for this :). Besides, your fork can't download videos either, so..
@mmpx12 if you want to update your "revision 1" with my version, go a head, and I'll remove my comments and my fork..
@FransUrbo Every videos are now in m3u8 format?
No idea actually.. As far as I can tell anyway. At least anything newer?
That was the only part of my changes that was a bit .. sketchy. The ffmpeg part. Don't know of a way to get the format of the finished file..
The actual videos downloaded is a .ts (whatever that is, file just say "data").
I just stumbled across a user, where they've separated the URI and the path in the json.
In the ones we've been using so far, it looks like this:
"slug": "80364414eaf2b05636b6b5656a618e69",
"stream_url_play": "mcEwQsg0QCKvuv5ZVpXdTZzSlRGN5FFNNRWaX1jMnl2cmQDM4kzMiRjN1EWO0MmYjFzMyITYjZzNjBzMiNTZhVTMlJGOlVDNxgDZzUDOmNTMhNjMzE2NwM2NxUDZiVzMiJTPnl2cmAjMwUDN3MTN3ETPl1Wa09DO1NTbugjNzkjM3QzL4U3Mt9SbvNmLl52b6RWZrFWZs9yL6MHc0RHapfJuAvE3cIqOnBN7",
There, stream_url_play is URI and PATH combined. But the user I just tried on, there it looks like this:
"slug": "eb05693a691592f53786b6cf96ff99a0",
"stream_url_play": "1w5u6xI8O9t2EYRu==gbh1kbTd0QZNURkVUOxUTY9IzZpNnJ1MWM5YjY5M2YjFWYjV2NiZmZjVDO4AzYyMGMxMjYidDM5IWM2UDZzgDMjZTMyAjMkFGM4EzNxQWNihTMwYmNh1zZpNnJ5kTOzQzNzUzNx0TZtlGd/gTdz0mLxETO5cTNxEzL4U3Mt9SbvNmLl52b6RWZrFWZs9yL6MHc0RHatp77xrJcd97NPKE8",
Took a while to figure out what happened there, but fixed in my "revision 4".
There's a / in the stream_url_play new (?) format. So the whole string is <slug>/<stream_url_play> (hence the second slash, which is in the new stream_url_play string). We just look for that, and then do things differently.. It's not pretty, but.. :)
Oh, also tried to remove the hard-coded .mp4, but then ffmpeg got nuts! Just copied the parts into the videos directory, without creating an actual concatenated video!
Using a .mp4 suffix seems to be working, I have no problem viewing it either with Preview or VLC on my (old) MacBook..
@FransUrbo can you please explain to me how u got videos to download from leaked zone? I have been trying for a while now but it hasnt worked for me
@goldenfreddynecro-boop you'll need my fork of the script - https://gist.github.com/FransUrbo/61033475c3409f8b2211c0d23daf8d90.
Basically, they're now streaming the videos in multiples. So you need to download all of them, then merge them into one. That's what my fork is doing. At least it worked a few weeks ago :).
Oh, and they've also added a throttle on the stream, so if you try to download the parts to fast, they'll block you for a few minutes :( :(.
I'm having problem with the video downloader..
Note, I've disabled the photo downloader, already done that. Works fine.. I also added some debugging, to see what it was doing.
Technically, I guess the error comes from
yt-dlp, but maybe it's not sent the correct/full URL?Posting that URL in Chrome, it did download something. The file
4776558.m3u8it downloaded contains:Sending either of those URLs do download the correct video. I'll report this to
yt-dlp..