Files
wvg/python/schemes/thePlatform.py
FoxRefire 5c56da872a Refactor: Use corsFetch for all schemes
Currently corsFetch is very stable and does not need to be used differently from pyfetch depending on whether the license server values the Origin header.
Nested await is no longer necessary and the code is more concise.
It is expected to be less confusing for debugging and for people creating new schemes.
2024-07-30 17:02:48 +09:00

7 lines
266 B
Python

payload = loadBody("json")
b64challenge = base64.b64encode(challenge).decode()
payload["getWidevineLicense"]["widevineChallenge"]=b64challenge
res = await corsFetch(licUrl, "POST", licHeaders, payload, "json")
licence = res["getWidevineLicenseResponse"]["license"]