pymsl
pymsl copied to clipboard
Error in getting licence
Another error
'dataBase64': base64.b64encode(challenge).decode('utf-8'),
File "/usr/lib/python2.7/base64.py", line 54, in b64encode encoded = binascii.b2a_base64(s)[:-1] TypeError: b2a_base64() argument 1 must be string or buffer, not int
Any idea?
What are you passing as the challenge?
MQ==
Are you passing it correctly? Read https://github.com/truedread/pymsl#get_licensechallenges to make sure.
Sorry, really having an hard time, can u explisn how to get challenge parameter please?
@truedread can u check if license data is successfully received using this new pymsl api? Seems not for me.
If you need some reference to upgrade, take a look here https://github.com/asciidisco/plugin.video.netflix/tree/msl2/resources/lib
The netflix addon is with a very advanced version derived from pymsl https://github.com/asciidisco/plugin.video.netflix/blob/msl2/resources/lib/MSLv2.py
I'm making my own changes, but I'm not getting connection to the license server in API v2(ERROR 400), I do not know yet if it's a bug, or something on the NF side.
See u. ☕️
@truedread
Are you passing it correctly? Read https://github.com/truedread/pymsl#get_licensechallenges to make sure.
Doesn't seem to describe how to get the licensechallanges, can you explain or update the link?
Anyone got this working with the new api? Is the session_id, the one i get when opening the drm session, for example widevine session? My opened session says session_id=b'\x8c\x9d\xe7\xc9>:\x95h:\x98\xdc\x14\xe7\xac\x85\x9c , i encoded that id to hex string. With that session and challenge i requested license, but i don't know how to proceed, my drm session is not decrypting the license?
This is what the license request returns...
https://www.netflix.com:443 "POST /nq/msl_v1/cadmium/pbo_licenses/%5E1.0.0/router HTTP/1.1" 200
{
'version':2,
'id':15552746826413,
'serverTime':1555274683444,
'from':'[email protected]/[email protected]',
'result':[
{
'licenseResponseBase64':'CAI==',
'providerSessionToken':None,
'links':{
'releaseLicense':{
'rel':'releaseLicense',
'href':'/releaseLicense?drmLicenseContextId=E1-BQ;XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX;STANDARD;1555274683424&licenseId=wv_sd_'
}
},
'sessionId':'8C9DE7C93E3A95683A98DC14E7AC859C'
}
]
}
Edit: I got it working, i just had a wrong return value for get_license function...
@armin884 sessionId is just a Unix timestamp, just do int(time.time() * 10000) (though the actual value does not seem to matter, just int(time.time()) or a hardcoded value may also work).
@nyuszika7h But the documentation for pymsl says @param session_id: DRM specific session ID passed as a string and why do i have to pass that value to the get_license(challenge, session_id) fuction, if that value doesn't matter? Did you got that licence request work?
@armin884 Yes, the license request works fine for me using a session ID like that.
I know someone else asked this and there was no answer. Is the "challenge" variable provided in the provided in the return dict of "load_manifest(viewable_id)"? Can someone give a full working example without there password?
Thank you so much in advance.
@armin884 or @nyuszika7h or @truedread can you help me to get the license?
does anyone have some information regarding the generation of the "challenge"? As far i understood one need to utilize "libwidevinecdm.so" somehow to generate the challenge, but i'm utterly stuck there. Normally the EME API is integrated with the browser, one way to do this would be loading chromium headless and try to access it, but i'm not sure about that. Any hint would be great :)
I theoretically could help you to get the challenge but it won't help you until you have some files that are needed for this to work for example device_client_id_blob.
i figured yes. But maybe it's best to not fiddle with own requests anyway. Why reinvent the wheel :) Going a different approach i think. But thanks man!
Anyone got this working with the new api? Is the session_id, the one i get when opening the drm session, for example widevine session? My opened session says session_id=b'\x8c\x9d\xe7\xc9>:\x95h:\x98\xdc\x14\xe7\xac\x85\x9c , i encoded that id to hex string. With that session and challenge i requested license, but i don't know how to proceed, my drm session is not decrypting the license?
This is what the license request returns...
https://www.netflix.com:443 "POST /nq/msl_v1/cadmium/pbo_licenses/%5E1.0.0/router HTTP/1.1" 200 { 'version':2, 'id':15552746826413, 'serverTime':1555274683444, 'from':'[email protected]/[email protected]', 'result':[ { 'licenseResponseBase64':'CAI==', 'providerSessionToken':None, 'links':{ 'releaseLicense':{ 'rel':'releaseLicense', 'href':'/releaseLicense?drmLicenseContextId=E1-BQ;XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX;STANDARD;1555274683424&licenseId=wv_sd_' } }, 'sessionId':'8C9DE7C93E3A95683A98DC14E7AC859C' } ] }Edit: I got it working, i just had a wrong return value for get_license function...
Can you please explain how you got it working? Because i have the same sessionId error..