Update CanalPlus2.py (Closes #38)

This commit is contained in:
FoxRefire 2024-07-20 18:46:22 +09:00
parent 4237a5bb60
commit f273994ee4

View File

@ -1,9 +1,5 @@
import re
import xml.etree.ElementTree as ET
b64challenge = base64.b64encode(challenge).decode()
res = await (await pyfetch(licUrl,
method="POST",
headers=licHeaders,
body=b64challenge
)).text()
res = await corsFetch(licUrl, "POST", licHeaders, b64challenge, "str")
licence = base64.b64decode(re.search(".*(.*)<\/license>", str(res))[2].encode())
licence = ET.XML(res)[0][0].text