fix amazon header

This commit is contained in:
FoxRefire 2024-05-24 23:08:36 +09:00
parent b060675698
commit 1bcc6ca855

View File

@ -1,6 +1,8 @@
import urllib.parse import urllib.parse
payload = f"widevine2Challenge={urllib.parse.quote(base64.b64encode(challenge).decode())}&includeHdcpTestKeyInLicense=true" payload = f"widevine2Challenge={urllib.parse.quote(base64.b64encode(challenge).decode())}&includeHdcpTestKeyInLicense=true"
licHeaders['User-Agent'] = "Mozilla/5.0 (X11; Linux x86_64; rv:126.0) Gecko/20100101 Firefox/126.0"
res = await js.corsFetch(licUrl, "POST", json.dumps(licHeaders), payload) res = await js.corsFetch(licUrl, "POST", json.dumps(licHeaders), payload)
res = json.loads(base64.b64decode(res.encode()).decode()) res = json.loads(base64.b64decode(res.encode()).decode())
licence = base64.b64decode(res['widevine2License']['license'].encode()) licence = base64.b64decode(res['widevine2License']['license'].encode())