wvg/python/schemes/NosTV.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

5 lines
168 B
Python

b64challenge = base64.b64encode(challenge).decode()
res = await corsFetch(licUrl, "POST", licHeaders, {"challenge": b64challenge}, "json")
licence = res["license"][0]