Smail/test/tools/check_manifest.py
smail 9813c9cd0f
Some checks are pending
Security Checks / security (push) Waiting to run
test: 增加刷新按钮与定时轮询机制云端部署端到端验收脚本
2026-09-14 09:28:25 +08:00

14 lines
661 B
Python

import urllib.request, ssl, json
ctx = ssl.create_default_context()
ctx.check_hostname = False
ctx.verify_mode = ssl.CERT_NONE
opener = urllib.request.build_opener(urllib.request.HTTPSHandler(context=ctx))
r = opener.open("https://47.108.78.12/manifest.json", timeout=5)
manifest = json.loads(r.read().decode("utf-8"))
for k, v in manifest.items():
if "List" in k:
print(k, "->", v.get("file"))
js_url = f"https://47.108.78.12/{v.get('file')}"
c = opener.open(js_url, timeout=5).read().decode("utf-8")
print("List asset contains manualRefresh:", "manualRefresh" in c)
print("List asset contains 60000:", "60000" in c)