VideoHelp Forum



Support our site by donate $5 directly to us Thanks!!!

Try StreamFab Downloader and download streaming video from Netflix, Amazon!



+ Reply to Thread
Page 1 of 2
1 2 LastLast
Results 1 to 30 of 34
  1. Member
    Join Date
    Feb 2022
    Location
    Search the forum first!
    Search PM
    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
    Last edited by A_n_g_e_l_a; 9th Sep 2023 at 13:43. Reason: added updated zip
    Quote Quote  
  2. 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.
    Quote Quote  
  3. Member
    Join Date
    Feb 2022
    Location
    Search the forum first!
    Search PM
    Originally Posted by ElCap View Post
    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.
    Perhaps something for the future...
    Quote Quote  
  4. Originally Posted by A_n_g_e_l_a View Post
    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

    it has a newly compiled version 4 protobuf. Any scripts that call the system pywidevine should not be placed in your WKS-KEYS folder.

    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
    Quote Quote  
  5. Originally Posted by jckzz View Post
    Originally Posted by A_n_g_e_l_a View Post
    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

    it has a newly compiled version 4 protobuf. Any scripts that call the system pywidevine should not be placed in your WKS-KEYS folder.

    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?
    Quote Quote  
  6. Member
    Join Date
    Feb 2022
    Location
    Search the forum first!
    Search PM
    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.
    Quote Quote  
  7. Member
    Join Date
    Feb 2022
    Location
    Search the forum first!
    Search PM
    Originally Posted by ElCap View Post
    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
    .
    thinking about that - you happy to field questions from users complaining of 'module not found' errors when they run their scripts? All existing WKS-KEYS scripts would need to have import paths changed to suit the rename. Not going to happen..
    Quote Quote  
  8. Thanks for letting us know Angela, I've updated mine and it works fine.
    Quote Quote  
  9. Originally Posted by A_n_g_e_l_a View Post
    Originally Posted by ElCap View Post
    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
    .
    thinking about that - you happy to field questions from users complaining of 'module not found' errors when they run their scripts? All existing WKS-KEYS scripts would need to have import paths changed to suit the rename. Not going to happen..
    thats a good point, it would just cause different issues.

    anyways, heres the l3.py with print in case of license request failure
    Image Attached Files
    • File Type: zip l3.zip (681 Bytes, 192 views)
    Quote Quote  
  10. Member
    Join Date
    Feb 2022
    Location
    Search the forum first!
    Search PM
    Originally Posted by ElCap View Post
    anyways, heres the l3.py with print in case of license request failure
    Thanks very much. I imagined you wanted full debugging info but "license request failed:" does very nicely!
    With your permission I'll incorporate that in the zip at #1 later.
    Quote Quote  
  11. Member
    Join Date
    Feb 2022
    Location
    Search the forum first!
    Search PM
    Updated post #1 with ElCap's l3.py option.
    Last edited by A_n_g_e_l_a; 9th Sep 2023 at 04:34.
    Quote Quote  
  12. 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!
    Quote Quote  
  13. Member
    Join Date
    Aug 2023
    Location
    Turkey
    Search Comp PM
    Originally Posted by A_n_g_e_l_a View Post
    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_update.zip
    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

    smal corektion need
    in the l3 on teh end missing close )

    need be corecktet as

    print()
    for key in keys:
    print('--key ' + key)

    kind regarts
    Quote Quote  
  14. Member
    Join Date
    Aug 2023
    Location
    Turkey
    Search Comp PM
    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
    Quote Quote  
  15. Member
    Join Date
    Feb 2022
    Location
    Search the forum first!
    Search PM
    Originally Posted by senkron24 View Post
    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
    Well spotted Thank you. Gremlins again! Corrected file at #1
    Quote Quote  
  16. Member
    Join Date
    Dec 2021
    Location
    Scotland
    Search Comp PM
    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.
    Quote Quote  
  17. Member
    Join Date
    Feb 2022
    Location
    Search the forum first!
    Search PM
    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
    Quote Quote  
  18. @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.
    Quote Quote  
  19. Member
    Join Date
    Feb 2022
    Location
    Search the forum first!
    Search PM
    Originally Posted by Obo View Post
    @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
    Quote Quote  
  20. Member
    Join Date
    Dec 2021
    Location
    Scotland
    Search Comp PM
    @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).
    Quote Quote  
  21. 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.
    Quote Quote  
  22. Ch3OH
    Join Date
    Dec 2023
    Location
    India
    Search Comp PM
    PSSH AAAAVHBzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAADQIARIQkN 7N0lZY4zYWMceOtUnNaBoMaW5rYWVudHdvcmtzIgw1QVQ5czFC bGw5cUYqAkhE
    LICENSE: https://license-global.pallycon.com/ri/licenseManager.do

    Wat will be the key ?
    Quote Quote  
  23. 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
    License
    Code:
    https://api3.hbogoasia.com/v1/drm/widevine/c3d6e9b3526ecb1d4b6d336fa8ee5ddfcb99a35f3a0036a8510c6fe3e8f06ab1
    Header
    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.
    Quote Quote  
  24. Member
    Join Date
    Feb 2022
    Location
    Search the forum first!
    Search PM
    Originally Posted by gantz View Post
    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"}'
    So the corrected l3 gives more information than just 'check protobufs'.
    It seem you've got a 403 error which in html speak means "Not allowed." And you've got a 'hash not found' message to further help you. - So can you imagine what might be missing?
    Noob Starter Pack. Just download every Widevine mpd! Not kidding!.
    https://files.videohelp.com/u/301890/hellyes6.zip
    Quote Quote  
  25. Hey guys, i tried the new version.

    Ill get that error
    Code:
    License URL: https://licenses.drm.p7s1video.net/drm/v1/ksm
    license request failed:
     b''
    i tried to download this https://video.prosiebenmaxx.de/serien/detektiv-conan/videos/die-stille-route-2-v_iftve97t5pg4

    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.
    Quote Quote  
  26. 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
    Quote Quote  
  27. 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?
    Quote Quote  
  28. 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...
    Quote Quote  
  29. Maaaaaan. now i get it, im sorry... i just had to see what you meant by token parameter. Thank you very much!
    Quote Quote  
  30. Ch3OH
    Join Date
    Dec 2023
    Location
    India
    Search Comp PM
    Originally Posted by jckzz View Post
    Originally Posted by A_n_g_e_l_a View Post
    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

    it has a newly compiled version 4 protobuf. Any scripts that call the system pywidevine should not be placed in your WKS-KEYS folder.

    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

    same here
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!