Support our site by donate $5 directly to us Thanks!!!
Try StreamFab Downloader and download streaming video from Netflix, Amazon!
Try StreamFab Downloader and download streaming video from Netflix, Amazon!
+ Reply to Thread
Results 31 to 60 of 85
-
yes, i know that
but tampermonkey can't find real pssh. but only short and wrong pssh
useless to get the key. need to be convert some value, but not idea wich one ...
[Attachment 70301 - Click to enlarge]
about your post#30 to find lic url simply search "lic"
but need also pssh to get the key ... -
The license url itself is pretty straightforward: https://www.youtube.com/youtubei/v1/player/get_drm_license?alt=json&key=KEY.
The video key I sent you works for the SD version since that's the max quality I get for that particular movie. Other movies do give me 1080p, and yt-dlp does seem to be able to dig it up here, but max SD in browser for some reason. Kind of weird, but it's just youtube being youtube I guess. -
https://www.youtube.com/watch?v=dSyicDf9UvI
PSSH:
AAAAQHBzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAACAiGFlPVV RVQkU6NzUyY2EyNzAzN2ZkNTJmMkjj3JWbBgAAAvRwc3NoAAAA AJoE8HmYQEKGq5LmW+CIX5UAAALU1AIAAAEAAQDKAjwAVwBSAE 0ASABFAEEARABFAFIAIAB4AG0AbABuAHMAPQAiAGgAdAB0AHAA OgAvAC8AcwBjAGgAZQBtAGEAcwAuAG0AaQBjAHIAbwBzAG8AZg B0AC4AYwBvAG0ALwBEAFIATQAvADIAMAAwADcALwAwADMALwBQ AGwAYQB5AFIAZQBhAGQAeQBIAGUAYQBkAGUAcgAiACAAdgBlAH IAcwBpAG8AbgA9ACIANAAuADAALgAwAC4AMAAiAD4APABEAEEA VABBAD4APABQAFIATwBUAEUAQwBUAEkATgBGAE8APgA8AEsARQ BZAEwARQBOAD4AMQA2ADwALwBLAEUAWQBMAEUATgA+ADwAQQBM AEcASQBEAD4AQQBFAFMAQwBUAFIAPAAvAEEATABHAEkARAA+AD wALwBQAFIATwBUAEUAQwBUAEkATgBGAE8APgA8AEsASQBEAD4A bgBRAGIANQBGAEoAZABWAFcAbABtAHoANwBKAFEAUAAvAG4AaA BmAGYAdwA9AD0APAAvAEsASQBEAD4APABDAEgARQBDAEsAUwBV AE0APgArAEUAUgBJAHIAQQBtAGgARwBVADgAPQA8AC8AQwBIAE UAQwBLAFMAVQBNAD4APABMAEEAXwBVAFIATAA+AGgAdAB0AHAA cwA6AC8ALwB3AHcAdwAuAHkAbwB1AHQAdQBiAGUALgBjAG8AbQ AvAGEAcABpAC8AZAByAG0ALwBwAGwAYQB5AHIAZQBhAGQAeQA/AHMAbwB1AHIAYwBlAD0AWQBPAFUAVABVAEIARQAmAGEAbQBwAD sAdgBpAGQAZQBvAF8AaQBkAD0ANwA1ADIAYwBhADIANwAwADMA NwBmAGQANQAyAGYAMgA8AC8ATABBAF8AVQBSAEwAPgA8AC8ARA BBAFQAQQA+ADwALwBXAFIATQBIAEUAQQBEAEUAUgA+AA== -
I had to update my version of the script and console then displayed all available values.
That's the license URL I originally used but it doesn't seem to work with GetWVKeys (I passed all request headers and the full alt & key parameters but it gives error 400). I used a different license URL and none of the five key IDs and keys work like yours did. What are you using to retrieve the keys?
Looks like 1080p works on Android but not Chrome on Windows. As you said, it's YouTube being YouTube.Last edited by besweeet; 10th Apr 2023 at 16:22.
-
Originally Posted by besweeet
1080p works great normally, even with L3. It's just this movie in particular that doesn't give me anything higher than SD in browser. -
holy shit
today after LZZA post (thanks LZZA for your post) eme can found the right pssh ... weird
[Attachment 70307 - Click to enlarge]
so, from this long pssh:
Code:AAAAQHBzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAACAiGFlPVVRVQkU6NzUyY2EyNzAzN2ZkNTJmMkjj3JWbBgAAAvRwc3NoAAAAAJoE8HmYQEKGq5LmW+CIX5UAAALU1AIAAAEAAQDKAjwAVwBSAE0ASABFAEEARABFAFIAIAB4AG0AbABuAHMAPQAiAGgAdAB0AHAAOgAvAC8AcwBjAGgAZQBtAGEAcwAuAG0AaQBjAHIAbwBzAG8AZgB0AC4AYwBvAG0ALwBEAFIATQAvADIAMAAwADcALwAwADMALwBQAGwAYQB5AFIAZQBhAGQAeQBIAGUAYQBkAGUAcgAiACAAdgBlAHIAcwBpAG8AbgA9ACIANAAuADAALgAwAC4AMAAiAD4APABEAEEAVABBAD4APABQAFIATwBUAEUAQwBUAEkATgBGAE8APgA8AEsARQBZAEwARQBOAD4AMQA2ADwALwBLAEUAWQBMAEUATgA+ADwAQQBMAEcASQBEAD4AQQBFAFMAQwBUAFIAPAAvAEEATABHAEkARAA+ADwALwBQAFIATwBUAEUAQwBUAEkATgBGAE8APgA8AEsASQBEAD4AbgBRAGIANQBGAEoAZABWAFcAbABtAHoANwBKAFEAUAAvAG4AaABmAGYAdwA9AD0APAAvAEsASQBEAD4APABDAEgARQBDAEsAUwBVAE0APgArAEUAUgBJAHIAQQBtAGgARwBVADgAPQA8AC8AQwBIAEUAQwBLAFMAVQBNAD4APABMAEEAXwBVAFIATAA+AGgAdAB0AHAAcwA6AC8ALwB3AHcAdwAuAHkAbwB1AHQAdQBiAGUALgBjAG8AbQAvAGEAcABpAC8AZAByAG0ALwBwAGwAYQB5AHIAZQBhAGQAeQA/AHMAbwB1AHIAYwBlAD0AWQBPAFUAVABVAEIARQAmAGEAbQBwADsAdgBpAGQAZQBvAF8AaQBkAD0ANwA1ADIAYwBhADIANwAwADMANwBmAGQANQAyAGYAMgA8AC8ATABBAF8AVQBSAEwAPgA8AC8ARABBAFQAQQA+ADwALwBXAFIATQBIAEUAQQBEAEUAUgA+AA==
Code:AAAAQHBzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAACAiGFlPVVRVQkU6NzUyY2EyNzAzN2ZkNTJmMkjj3JWbBg==
-
-
i've get keys with edited script. python script. not trough getwvkeys
and what headers ? no need headers -
-
Yeah, Youtube is being annoying and will only serve up 1080p on PC for seemingly random titles. Like https://www.youtube.com/watch?v=6lCCk6rgn84 for example, you should be able to get FHD with your script.
-
Well, that's not true. L3 works perfectly fine:
Code:General Complete name : /temp/Pumping.Iron.1977.1080p.WEB-DL.mp4 Format : dash Codec ID : dash (iso6/mp41) File size : 3.49 GiB Duration : 1 h 25 min Overall bit rate : 5 850 kb/s Encoded date : UTC 2021-12-27 13:07:51 Tagged date : UTC 2021-12-27 13:07:51 Video ID : 1 Format : vp09 Codec ID : vp09 Duration : 1 h 25 min Bit rate : 5 848 kb/s Width : 1 480 pixels Height : 1 080 pixels Display aspect ratio : 1.370 Frame rate mode : Constant Frame rate : 23.976 (24000/1001) FPS Color space : YUV Bits/(Pixel*Frame) : 0.153 Stream size : 3.49 GiB (100%) Title : ISO Media file produced by Google Inc. Encoded date : UTC 2021-12-27 13:07:51 Tagged date : UTC 2021-12-27 13:07:51 Color range : Limited Color primaries : BT.709 Transfer characteristics : BT.709 Matrix coefficients : BT.709
-
Hmm... What could I be doing wrong? I take the same keys I use for the 480p WEBM DL (which works) but for the 1080p WEBM and it doesn't work. Are there different keys I need to retrieve?
-
Yes, they are different. Audio is the same, but they differ depending on SD or HD.
480p:
Code:--key c8a34895e6cf5f829d5fbfa8b17a4db5:1a7981d8ae45e549621e5f4da66de542
Code:--key e5add253150450bda1f09f79959a32fd:0db74b99402408a3559d86ded402f0ce
-
Guys,
I saw this note when converting the cURL to Python on curlconverter.com
[Attachment 70325 - Click to enlarge]
So when it says json_data will not be serialized by requests exactly as it was in the original request, what should I do? (It is a bit different from those in normal situations)
I used WKS-KEYS to get the content keys, and I modified the original one, uploaded it to GitHub for convenience.
Would anyone have a look at my code, for when I ran the .py program, it said "you should generate a license first"...
URL hidden by user
I have pasted all the things includin' cookies, headers, params and json_data to the headers.py in the WKS-KEYS.
Much appreciated.
Should it be
Code:response = requests.post( 'https://www.youtube.com/youtubei/v1/player/get_drm_license', params=params, cookies=cookies, headers=headers, json=json_data, )
Code:response = requests.post( 'https://www.youtube.com/youtubei/v1/player/get_drm_license', params=params, cookies=cookies, headers=headers, data=data, )
Last edited by CrymanChen; 18th Apr 2023 at 20:08.
-
If we parse the license request, we can see this:
Code:{'trackType': 'DRM_TRACK_TYPE_HD', 'keyId': '5a3SUxUEUL2h8J95lZoy_Q=='}, {'trackType': 'DRM_TRACK_TYPE_SD', 'keyId': 'yKNIlebPX4KdX7-osXpNtQ=='}, {'trackType': 'DRM_TRACK_TYPE_AUDIO', 'keyId': '-QxhjmVLVyiyATweN8T-Uw=='}
@CrymanChen:
You're missing the actual license request. If you look at your curled data, there's a 'licenseRequest' in the json. -
I continue to hit a wall...
If I curl the get_drm_license request from my Android phone, it returns all three track types (per your quote above). However, if I submit everything through the GetWVKeys script, it continues to only give me SD and audio.
I looked through the script and found headers and context information. I swapped everything with headers and other data from my phone yet it still only returns SD and audio.
I'm starting to think it's the GetWVKeys Python script I'm using. Maybe it's not passing everything that YouTube needs and it defaults to desktop.
Are you using the YouTube link I sent or a different link? GetWVKeys said that some older HD uploads are L3 while newer ones are L1.
I tried CrymanChen's script and get the same error. I've added full headers to headers.py and added an empty section for params and json_data. I've copied the curled json_data (starting with context all the way to drmVideoFeature (since that is last) but the same error comes through: "generate a license request first!" It's probably a formatting error but I've had over 100 unsuccessful tests today.Last edited by besweeet; 12th Apr 2023 at 17:20.
-
Yeah, I'm not really sure what's wrong. For these "Free with ads" movies, it's seemingly random what titles have HD on PC. The one you first linked (Super Size), is 480p max. The one I linked later (Pumping Iron), is 1080p. Every movie I try that offer HD can be decrypted with L3, so that does not seem like the limitation. Unless there's an unreal coincidence that I'm picking only titles that work, it's Youtube itself that's limiting what is available on PC. I'm sure it's possible to write a script that emulates an android device request in order to get all titles in HD, but these movies are so easily accessible elsewhere, I can't imagine someone has gone through the trouble of doing that.
You can try this:
1. Pick a movie that you know have 1080p in browser and actually select it in the player.
2. Refresh the page, play movie, and then curl the license or export whatever data your scripts need.
3. You should now theoretically get three sets of keys. One for HD, one for SD, and one for Audio. -
-
-
If you read through this great post by A_n_g_e_l_a, she talks about generating an extra challenge. That's what you got to do for 'licenseRequest'. And it looks like she's using WKS, just like you, so you might be able to adapt it to youtube with the help of her examples.
Originally Posted by besweeet -
I know this is a weird question ,but do you think youtube cares about the pssh ?
The following was tested using a pssh and i made a small change in the pssh and requested again :
[Attachment 70424 - Click to enlarge]
weird right ? different pssh and still the same keys , do you think youtube only cares about "videoId" ?
Regards -
This is a great path to follow, but youtube is a special case where you need to make a small change because license in base64 can have unwanted characters .
here is a small hint to fix the problem (thanks to ElCap):
Code:licence.json()["license"].replace("-", "+").replace("_", "/")
Regards -
-
No you are not out of luck yet , please take a look at this thread to get your L3 CDM:
https://forum.videohelp.com/threads/408031-Dumping-Your-own-L3-CDM-with-Android-Studio
TPD-Keys requires Widevine RSA key pair file , you can get that from the cdm using the method in this post:
https://forum.videohelp.com/threads/407144-Help-with-Channel-4-Key-to-this-programme-a...se#post2668861
Good Luck -
That's a good point. And it would seem that PSSH is irrelevant and the license stays the same for everyone.
Since this forum tend to favor WKS-KEYS, I cobbled together a youtube script for it. I'm more of a "tinkerer" than a programmer, but it seems to work all right. Just drop it in the wks-keys folder, put the curled license data in headers.py and run it.
Code:import requests import json from pywidevine.L3.cdm import deviceconfig from base64 import b64encode from pywidevine.L3.decrypt.wvdecryptcustom import WvDecrypt import headers pssh = "AAAAQXBzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAACEiGVlUX01FRElBOjZlMzI4ZWQxYjQ5YmYyMWZI49yVmwY=" lic_url = "https://www.youtube.com/youtubei/v1/player/get_drm_license?alt=json&key=AIzaSyAO_FJ2SlqU8Q4STEHLGCilw_Y9_11qcW8" def WV_Function(pssh, lic_url, cert_b64=None): wvdecrypt = WvDecrypt(init_data_b64=pssh, cert_data_b64=cert_b64, device=deviceconfig.device_android_generic) raw_request = wvdecrypt.get_challenge() json_data=headers.json_data json_data["licenseRequest"] = b64encode(raw_request).decode("utf-8") widevine_license = requests.post(lic_url, cookies=headers.cookies, headers=headers.headers, json=json_data) license_b64 = widevine_license.json()["license"].replace("-", "+").replace("_", "/") wvdecrypt.update_license(license_b64) Correct, keyswvdecrypt = wvdecrypt.start_process() if Correct: return Correct, keyswvdecrypt correct, keys = WV_Function(pssh, lic_url) print() for key in keys: print('--key ' + key)
-
Really appreciate it. Finally made it by trying on my own.
[Attachment 70425 - Click to enlarge]
However, may I ask which is the manifest...
[Attachment 70426 - Click to enlarge]
Similar Threads
-
how to download and decrypt DRM protected video from youtube
By tania01 in forum Video Streaming DownloadingReplies: 5Last Post: 10th Feb 2023, 15:31 -
Youtube-tv decrypt
By rippernoobie in forum Video Streaming DownloadingReplies: 0Last Post: 2nd Nov 2022, 02:47 -
How to download YouTube Movies/TV Shows and decrypt it?
By PU User in forum Video Streaming DownloadingReplies: 4Last Post: 15th Apr 2022, 12:18 -
FFMPEG encrypt & decrypt Video offline
By dara.alavi in forum ProgrammingReplies: 2Last Post: 16th Feb 2021, 06:41 -
I need help decrypt movie files (starzplay) , files included !
By Dazzle Cat in forum Video Streaming DownloadingReplies: 1Last Post: 1st Oct 2020, 18:29