Pywidevine does this without having to do it on the scheme side. This makes the scheme more concise.
10 lines
354 B
Python
10 lines
354 B
Python
payload = json.loads(base64.b64decode(licBody.encode()).decode())
|
|
b64challenge = base64.b64encode(challenge).decode()
|
|
payload["getWidevineLicense"]["widevineChallenge"]=b64challenge
|
|
res = await (await pyfetch(licUrl,
|
|
method="POST",
|
|
headers=licHeaders,
|
|
body=json.dumps(payload)
|
|
)).json()
|
|
licence = res["getWidevineLicenseResponse"]["license"]
|