wvg/python/schemes/Youku.py
2024-06-09 01:20:14 +09:00

12 lines
427 B
Python

import urllib.parse
payload = urllib.parse.parse_qs(loadBody("str"))
challengeB64 = base64.b64encode(challenge).decode()
# keep payload value as list
payload['licenseRequest'] = [challengeB64]
# convert payload to a dictionary with a single value
payload = {k: v[0] for k, v in payload.items()}
payload = urllib.parse.urlencode(payload)
res = await corsFetch(licUrl, "POST", licHeaders, payload, "json")
licence = res['data']