wvg/python/schemes/thePlatform.py
2024-05-03 19:21:17 +09:00

10 lines
381 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 = base64.b64decode(res["getWidevineLicenseResponse"]["license"].encode())