Delightful error message
This commit is contained in:
parent
658636c1fb
commit
3037104bd3
@ -1,5 +1,9 @@
|
|||||||
# parse license challenge
|
# parse license challenge
|
||||||
|
try:
|
||||||
cdm.parse_license(session_id, licence)
|
cdm.parse_license(session_id, licence)
|
||||||
|
except Exception as e:
|
||||||
|
js.document.getElementById('result').value="sch3m3n0t6upp0rt:y0ucanr3qu3st0rsu6mit\n\n[MPD?]\nhttps://gist.github.com/FoxRefire/fd606ec29a9bfa1f1bef897e0dc3a231"
|
||||||
|
raise Exception(e)
|
||||||
|
|
||||||
# get keys
|
# get keys
|
||||||
keys=""
|
keys=""
|
||||||
|
@ -3,6 +3,8 @@ from pywidevine.device import Device, DeviceTypes
|
|||||||
from pywidevine.pssh import PSSH
|
from pywidevine.pssh import PSSH
|
||||||
|
|
||||||
import json
|
import json
|
||||||
|
import js
|
||||||
|
import base64
|
||||||
from pyodide.http import pyfetch
|
from pyodide.http import pyfetch
|
||||||
|
|
||||||
# prepare pssh
|
# prepare pssh
|
||||||
@ -25,6 +27,7 @@ except OSError:
|
|||||||
pKey=await (await pyfetch("private_key.pem")).bytes()
|
pKey=await (await pyfetch("private_key.pem")).bytes()
|
||||||
|
|
||||||
except OSError:
|
except OSError:
|
||||||
|
js.document.getElementById('result').value="n0suchd3v1c3f113:r3adth3fuck1ngma2ua1\n\n[MPD?]\nhttps://github.com/FoxRefire/wvg?tab=readme-ov-file#instalation"
|
||||||
raise FileNotFoundError("CDM Keys not found!, RTFM!")
|
raise FileNotFoundError("CDM Keys not found!, RTFM!")
|
||||||
|
|
||||||
device = Device(client_id=cID,
|
device = Device(client_id=cID,
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
import base64
|
|
||||||
res = await (await pyfetch(licUrl,
|
res = await (await pyfetch(licUrl,
|
||||||
method="POST",
|
method="POST",
|
||||||
headers=licHeaders,
|
headers=licHeaders,
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
import base64
|
|
||||||
payload = json.loads(base64.b64decode(licBody.encode()).decode())
|
payload = json.loads(base64.b64decode(licBody.encode()).decode())
|
||||||
challengeArr = list(challenge)
|
challengeArr = list(challenge)
|
||||||
payload['license_request_data']=challengeArr
|
payload['license_request_data']=challengeArr
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
import base64
|
|
||||||
payload = json.loads(base64.b64decode(licBody.encode()).decode())
|
payload = json.loads(base64.b64decode(licBody.encode()).decode())
|
||||||
challengeB64 = base64.b64encode(challenge).decode()
|
challengeB64 = base64.b64encode(challenge).decode()
|
||||||
payload['params']['object'] = challengeB64
|
payload['params']['object'] = challengeB64
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
import base64
|
|
||||||
import js
|
|
||||||
from pyodide.ffi import to_js
|
from pyodide.ffi import to_js
|
||||||
req = json.loads(base64.b64decode(licBody.encode()).decode())
|
req = json.loads(base64.b64decode(licBody.encode()).decode())
|
||||||
b64challenge = base64.b64encode(challenge).decode()
|
b64challenge = base64.b64encode(challenge).decode()
|
||||||
|
Loading…
Reference in New Issue
Block a user