This version of WKS-KEYS will work on systems with pywidevine module version 1.6 and above.
https://files.videohelp.com/u/301890/WKS-KEYS.zip
[EDIT}
New version with El Cap's l3.py error reporting. Code has been corrected to give a more understandable response in the case of a bad licence request.
https://files.videohelp.com/u/301890/WKS-KEYS_L3_correction.zip
(Missing bracket now replaced)
I've also removed the L1 folder - as that didn't have protobuf 4 updated; no-one using WKS-KEYS has an L1 CDM anyway.
[/EDIT]
it has a newly compiled version 4 protobuf. Any scripts that call the system pywidevine should not be placed in your WKS-KEYS folder.
Edit; It should go without saying that if you have installed python pywidevine your python protobuf module will be updated to version 4.x.x
This WKS-KEYS version expects version 4 so if you do not have it
Code:pip install -U protobuf
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 1 to 30 of 34
-
Last edited by A_n_g_e_l_a; 9th Sep 2023 at 13:43. Reason: added updated zip
-
Good idea. I'd even go one step further and rename the pywidevine folder to something else so it doesn't conflict with the one installed via pip
Can you add a print statement that will print out the response from the license server in case of an unsuccessful licence request?
The error message "unable to parse license - check protobufs" is hard to troubleshoot when that's all the user provides. -
-
I use this
but still got
PSSH: AAAAXHBzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAADwSEPUuGa G0GlU9wVmQ9Tbs9x4SEPUuGaG0GlU9wVmQ9Tbs9x4SEPUuGaG0 GlU9wVmQ9Tbs9x5I49yVmwY=
License URL: https://license-global.pallycon.com/ri/licenseManager.do
unable to parse license - check protobufs
is there anything i miss?
my protobuf version is 4.24.3
-
It's not a problem with your protobufs version its a generic error that basically just means that the license response is not correct. It could be anything from an error response from the license server to a correct response from the license server but not being parsed correctly (ie. In json format)
Any auth headers in the license request? -
All users be aware the WKS-KEYS module is incomplete. There is no Content Decryption Module present - just place-holders. Be sure, before use, to place your CDM (device_client_id.blob and device_private.key) within the pywidevine/L3/cdm/devices/android_generic/ folder and remove the original files there
THIS IS NOT A SUPPORT THREAD FOR THE USE OF WKS-KEYS. Ask your questions elsewhere.Last edited by A_n_g_e_l_a; 8th Sep 2023 at 08:35.
-
-
-
-
Updated post #1 with ElCap's l3.py option.
Last edited by A_n_g_e_l_a; 9th Sep 2023 at 04:34.
-
Excellent work as always. And by changing names of folder and imports, it's working great side by side with the pip version. Super useful, thank you!
-
-
need smal corecktion on the l3.py on the end missing close parameter )
must be like this
print()
for key in keys:
print('--key ' + key)
kind regarts -
-
Thanks Angela for the WKS-KEYS_L3_correction. All my scripts have been written around the original WKS-KEYS which didn't work with protobuf 4, so I was stuck with previous pb versions. Now, they're all working well with protobuf 4.24.3. That's excellent.
Just one little niggle though. I completely remove all the contents of WKS-KEYS with the exception of the pywidevine folder, they're all replaced with my individual scripts for different web-players. Now, there is the annoyance with being left with the temporary files original_lic.bin and parsed_lic.bin. These files are created in \WKS-KEYS\pywidevine\L3\cdm\cdm.py
That is no different to the previous version of WKS-KEYS, but they were always removed before. I cannot find any part of the script that does the removal, so I can only assume that was a part of protobuf <4 before. Obviously I can amend my scripts to delete them but it'd be much better if I can find a way of deleting them from within the pywidevine sub-modules so that the deletions are not dependant on code within my scripts.
Just a small point really. -
You can always revert to your wks-keys version and copy only the folder with the protobuf in WKS-KEYS/pywidevine/L3/cdm/formats.
Last edited by A_n_g_e_l_a; 14th Sep 2023 at 09:45.
Noob Starter Pack. Just download every Widevine mpd! Not kidding!.
https://files.videohelp.com/u/301890/hellyes6.zip -
@deccavox, look at cdm.py (around lines 323-329) - you can simply remove the lines that write these files. They are written for debugging purposes, and you don't seem to want to looking into why they were created anyway.
I've also eliminated the L1 and L3 modules (L1 is useless anyway, and L3 then is just superfluous), so that cdm/ and decrypt/ are now folders in pywidevine/. Easily done with an IDE like PyCharm. -
Thanks useful info.
But removing the L3 folder can cause complications for users of scripts that are released expecting the standard WKS-KEYS file structure. If the changes are purely for you no matter. But if ever you publish a script it will have non-standard WKS-KEYS imports that will need to be changed.Noob Starter Pack. Just download every Widevine mpd! Not kidding!.
https://files.videohelp.com/u/301890/hellyes6.zip -
@Obo
Excellent and thanks. I've just hashed out those lines. Perfect.
PS: pycharm vs Visual Studio Code. Which one is better(I use the latter).
-
That's right; if ever I'll publish something, it won't be a single script, but a more complex application including packages. The complete pywidevine folder then would then be part of the package.
[I've written a small GUI application that lets you enter MPD/download URL, license header in curl notation and destination filename. The application will invoke yt-dlp after fetching the keys, decrypt and mux the files. It's written using the qtpy package (a Python Qt package), and surely needs quite some knowledge to set up elsewhere - it's only used on my Macbook Air M1. I have no idea if it even will run under Windows without modification.
The application could probably be extended by what you and others have scripted in e.g. your STV downloader.
If there's interest, I can create a Github project - borrowing your disclaimer"I post these scripts in the hope they will be of use to those who already understand how to use them."]
I've only used PyCharm, and can't say anything about Visual Studio. Both need some learning and familiarisation, and I'm quite happy with PyCharm. I expect both to have quite similar features.Last edited by Obo; 14th Sep 2023 at 10:21.
-
PSSH AAAAVHBzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAADQIARIQkN 7N0lZY4zYWMceOtUnNaBoMaW5rYWVudHdvcmtzIgw1QVQ5czFC bGw5cUYqAkhE
LICENSE: https://license-global.pallycon.com/ri/licenseManager.do
Wat will be the key ? -
before WKS-KEYS_L3_correction, I get error unable to parse license - check protobufs
when I use WKS-KEYS_L3_correction, I get error license request failed:
b'{"code":403,"message":"Hash not found"}'
pssh
Code:AAAAP3Bzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAAB8SEO5mY1pqtgGV54xbLLrHyYYaBWV6ZHJtSOPclZsG
Code:https://api3.hbogoasia.com/v1/drm/widevine/c3d6e9b3526ecb1d4b6d336fa8ee5ddfcb99a35f3a0036a8510c6fe3e8f06ab1
Code:import requests headers = { 'authority': 'api3.hbogoasia.com', 'accept': '*/*', 'accept-language': 'en-US,en;q=0.9', 'cache-control': 'no-cache', 'origin': 'https://www.hbogo.co.th', 'pragma': 'no-cache', 'referer': 'https://www.hbogo.co.th/', 'sec-ch-ua': '"Not_A Brand";v="8", "Chromium";v="120", "Google Chrome";v="120"', 'sec-ch-ua-mobile': '?0', 'sec-ch-ua-platform': '"Windows"', 'sec-fetch-dest': 'empty', 'sec-fetch-mode': 'cors', 'sec-fetch-site': 'cross-site', 'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36', 'content-type': 'application/x-www-form-urlencoded', } data = '^\b^\x04' response = requests.post( 'https://api3.hbogoasia.com/v1/drm/widevine/c3d6e9b3526ecb1d4b6d336fa8ee5ddfcb99a35f3a0036a8510c6fe3e8f06ab1', headers=headers, data=data, )
Last edited by gantz; 1st Jan 2024 at 04:59.
-
Noob Starter Pack. Just download every Widevine mpd! Not kidding!.
https://files.videohelp.com/u/301890/hellyes6.zip -
Hey guys, i tried the new version.
Ill get that errorCode:License URL: https://licenses.drm.p7s1video.net/drm/v1/ksm license request failed: b''
i downloaded the corrected WKS_KEYS and replaced the l3 with my own.
----------------
edit: i tried with another website and it worked. So something is wrong with my doing on prosiebenmaxx...Last edited by mosh1; 1st Jan 2024 at 13:43.
-
What does your headers.py look like? And what license url do you use? The license url for prosiebenmaxx needs the token parameter.
Keys for your video:
Code:eb3d12aa00ba3d9d6e63d674648e02f9:41092e7b100415661531bea42e89156c d34228461e9153b88eb59f52d6658267:73739403a9f8d2b4bfda1e27271e623d b166f8d8d2d059be94f3ea53cecf297d:17a810f1e7ed7281592d8665e586c5f3 00a2f4d912165fdfa549c5baf5b34c6a:5df73deb309e5ba165637e310f58ec98
-
okay: just for clarity, i will download this via N_m3u... downloader: https://video.prosiebenmaxx.de/serien/detektiv-conan/videos/das-lebkuchenhaus-in-dem-d...v_3g7v5w5nzhh4
- ill get the .mpd url via F12 and paste it, so i get a encrpted video and audio file.
- the pssh is now visible CAESELZsb2mn8izikS2d6l4z0XsaEnByb3NpZWJlbnNhdGdsb2 1leCIYcDdzMXZpZGVvOnZfM2c3djV3NW56aGg0KgJIRA==
- after that i search in f12 for "license" i get two results. i will use the second entry where "X-Ksm-Status:
0" is written
- then i copy the curl (bash) and convert it online
- then i will copy the result in headers.py
- i start l3.py
- enter my pssh CAESELZsb2mn8izikS2d6l4z0XsaEnByb3NpZWJlbnNhdGdsb2 1leCIYcDdzMXZpZGVvOnZfM2c3djV3NW56aGg0KgJIRA==
- enter my license url "https://licenses.drm.p7s1video.net/drm/v1/ksm"
and it failed.
where am i wrong? -
The PSSH is probably wrong, at least it is not the PSSH from the mpd file (AAAAZnBzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAAEYIARIQ6 z0SqgC6PZ1uY9Z0ZI4C+RoScHJvc2llYmVuc2F0Z2xvbWV4Ihh wN3MxdmlkZW86dl9pZnR2ZTk3dDVwZzQqAkhE)
For Pro7Maxx the headers dict can be empty, the license url needs a token parameter: https://licenses.drm.p7s1video.net/drm/v1/ksm?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1Ni...CI6InZvZDAxIn0... -
Maaaaaan. now i get it, im sorry... i just had to see what you meant by token parameter. Thank you very much!
Similar Threads
-
Resize8 - An updated version of the original resizing function
By hello_hello in forum Video ConversionReplies: 21Last Post: 27th Mar 2025, 06:09 -
Correcting Protobuf: Downgrade to 3.19.0 error
By A_n_g_e_l_a in forum Video Streaming DownloadingReplies: 5Last Post: 6th Apr 2023, 23:59 -
Difference in Matroska versions (version 4 vs version 2)
By halp in forum Newbie / General discussionsReplies: 4Last Post: 1st Jul 2021, 00:02 -
Updated FFMpeg for Windows XP?
By rowjekto in forum Newbie / General discussionsReplies: 2Last Post: 16th Nov 2020, 08:51 -
News!!! DVDFab 11.1.0.1 Updated!
By DVDFab Staff in forum Latest Video NewsReplies: 0Last Post: 14th Aug 2020, 05:06