Encountered some problems and hope to get help.
Got the PSSH from the kid in the mpd file, Blocking the URL and copying the data from the copy as curl (cmd) to get a new authorization bearer.
The headers are also fully filled in, whether use getwvkeys.cc or the py script to return "Invalid auth token".
The problem should lie in the one-time token requested by https://www.sokmil.com/purchase_auth/, not quite Sure![]()
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 23 of 23
-
Last edited by d9111; 21st Jan 2023 at 10:23.
-
-
I couldn't get the key with getwvkeys, so I installed pywidevine and changed the code from cdm.parse_license(session_id, licence.content) to cdm.parse_license(session_id, licence.json()['license']), and then I was able to parse the key!
-
-
-
open main.py and edit on line 122 as explained on post#4
[Attachment 70181 - Click to enlarge] -
-
create a wvd file which pywidevine uses to locate your CDM (Content Decryption Module). My command looked like this:-
Code:pywidevine create-device -k /home/angela/Downloads/CDM-L3 2021-09/device_private_key -c /home/angela/Downloads/CDM-L3 2021-09/device_client_id_blob -t ANDROID -l 3 -o CDM2109.wvd
- pywidevine-create-device
- -k <location of your cdm key>
- -c <location of your cdm blob>
- -t Android (specifies type)
- -l 3 (spcifies level)
- -o <save name>
Code:py c4-dl.py --download --wvd "samsung_sm-t819_6b0d43ba_4121_l3.wvd" --url "https://www.channel4.com/programmes/the-big-bang-theory/on-demand/44564-001"
-
HTML Code:
pywidevine create-device -k /home/115/app 2021-09/device_private_key -c /home/115/app 2021-09/device_client_id_blob -t ANDROID -l 3 -o CDM2109.wvd
Error: Got unexpected extra arguments (2021-09/device_private_key 2021-09/device_client_id_blob) -
-
easy way to create wvd file.
create folder named folderA. copy device_private_key and device_client_id_blob into it. then enter folderA. create empty folderB inside folderA. open command prompt (cmd) and navigate to folderA. enter THIS EXACT COMMAND: pywidevine create-device -k device_private_key -c device_client_id_blob -t "ANDROID" -l 3 -o folderB -
Thanks for your help I tested it on bitmovin and it got the kid:key, but I failed on sokmil I changed line 122 as you said
HTML Code:cdm.parse_license(session_id, licence.json()['license'])
HTML Code:PSSH: AAACmnBzc2gAAAAAmgTweZhAQoarkuZb4IhflQAAAnp6AgAAAQABAHACPABXAFIATQBIAEUAQQBEAEUAUgAgAHgAbQBsAG4AcwA9ACIAaAB0AHQAcAA6AC8ALwBzAGMAaABlAG0AYQBzAC4AbQBpAGMAcgBvAHMAbwBmAHQALgBjAG8AbQAvAEQAUgBNAC8AMgAwADAANwAvADAAMwAvAFAAbABhAHkAUgBlAGEAZAB5AEgAZQBhAGQAZQByACIAIAB2AGUAcgBzAGkAbwBuAD0AIgA0AC4AMAAuADAALgAwACIAPgA8AEQAQQBUAEEAPgA8AFAAUgBPAFQARQBDAFQASQBOAEYATwA+ADwASwBFAFkATABFAE4APgAxADYAPAAvAEsARQBZAEwARQBOAD4APABBAEwARwBJAEQAPgBBAEUAUwBDAFQAUgA8AC8AQQBMAEcASQBEAD4APAAvAFAAUgBPAFQARQBDAFQASQBOAEYATwA+ADwASwBJAEQAPgBnAE0AQwBDAFoAUwBwAGsARwBFAFMAZwBnADAARgB4AGEAaQA1AEEATABRAD0APQA8AC8ASwBJAEQAPgA8AEMASABFAEMASwBTAFUATQA+ADMAaQBVAFIATABsAEgANgAxAGYAQQA9ADwALwBDAEgARQBDAEsAUwBVAE0APgA8AEwAQQBfAFUAUgBMAD4AaAB0AHQAcABzADoALwAvAGwAaQBjAGUAbgBzAGUALgBjAGEAbgBkAGwALgBqAHAALwB2AGkAZABlAHgALwBwAGwAYQB5AHIAZQBhAGQAeQAvADwALwBMAEEAXwBVAFIATAA+ADwALwBEAEEAVABBAD4APAAvAFcAUgBNAEgARQBBAEQARQBSAD4AAAAAiXBzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAAGkIARIQZYLAgGQqRBigg0Fxai5ALRoIY2FzdGxhYnMiQGV5SmhjM05sZEVsa0lqb2lOalU0TW1Nd09EQTJOREpoTkRReE9HRXdPRE0wTVRjeE5tRXlaVFF3TW1RaWZRPT0yB2RlZmF1bHQ=
HTML Code:license server URL: https://license.candl.jp/sokmil/widevine/
Looks like I've got something wrong, so it fails!
-
because you use long pssh (wdv+PR)
need to be converted
try this one:
Code:AAAAiXBzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAAGkIARIQZYLAgGQqRBigg0Fxai5ALRoIY2FzdGxhYnMiQGV5SmhjM05sZEVsa0lqb2lOalU0TW1Nd09EQTJOREpoTkRReE9HRXdPRE0wTVRjeE5tRXlaVFF3TW1RaWZRPT0yB2RlZmF1bHQ=
-
-
my pssh is right
have you tried with l3.py? this does not work for sokmil. need a proper script to get -
You can get the key properly with this code.
Code:# sokmil-auth.py import requests header = { "User-Agent" : "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36" } # Please search for the key "SCS" in Chrome's cookies and input its value here. cookie = { "SCS":"yourSCS", } authURL = "https://www.sokmil.com/purchase_auth/" payload = { "keyId" : "yourKID" } response = requests.post( url = authURL, headers = header, cookies = cookie, data = payload, ) token = response.text print(token)
Code:# getkeys.py from pywidevine.cdm import Cdm from pywidevine.device import Device from pywidevine.pssh import PSSH import requests # Please use the KID of the content that you want to download to generate a PSSH using this tool: https://tools.axinom.com/generators/PsshBox. Then, please enter the generated PSSH here. pssh = PSSH("yourPSSH") # load device device = Device.load(r"yourPATH") # load cdm cdm = Cdm.from_device(device) # open cdm session session_id = cdm.open() # get license challenge challenge = cdm.get_license_challenge(session_id, pssh) header = { "authorization" : "Bearer yourTOKEN", "User-Agent" : "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36" } licence = requests.post( url = "https://license.candl.jp/sokmil/widevine/", headers = header, data=challenge ) licence.raise_for_status() # parse license challenge cdm.parse_license(session_id, licence.json()['license']) # print keys for key in cdm.get_keys(session_id): print(f"[{key.type}] {key.kid.hex}:{key.key.hex()}") # close session, disposes of session data cdm.close(session_id)
-
Thanks for the script, trying to learn as best i can from all the input here, where do I locate my "payload = {"keyId" : "yourKID""? please and thank you.
-
Traceback (most recent call last):
Last edited by jubojuru; 18th Jan 2024 at 03:46.
Similar Threads
-
4K Video Downloader and Win 10 (v. 1909)
By jgg in forum Newbie / General discussionsReplies: 8Last Post: 29th Dec 2024, 14:05 -
How to download from sokmil.com?
By MaskedBarbarian in forum Video Streaming DownloadingReplies: 26Last Post: 6th May 2023, 03:09 -
slow video downloader
By natty in forum Newbie / General discussionsReplies: 7Last Post: 14th Nov 2021, 11:13 -
Flash Video Downloader
By jastavoss@msn.com in forum Video Streaming DownloadingReplies: 0Last Post: 23rd May 2019, 18:26 -
Freemake Video Downloader. Any restrictions?
By vinckles in forum Video Streaming DownloadingReplies: 0Last Post: 16th Feb 2018, 06:47