| 123456789101112131415161718192021222324252627282930 |
- """Find sid 14414741 in the live srvlist and show its full server config."""
- import asyncio
- import httpx
- import json
- async def main():
- async with httpx.AsyncClient(timeout=15) as c:
- r = await c.get("https://list-box.dhsf.xqhuyu.com/box_serverlist/206923.txt")
- data = r.json()
- for gid, g in data.items():
- for s in g.get("tree", []):
- if str(s.get("d")) == "14414741":
- print(f"MATCH: {gid} {g.get('list_name')}")
- print(json.dumps(s, ensure_ascii=False, indent=2))
- return
- print("not found in srvlist, trying cache")
- cache = "D:/ProgramFiles/996box/GameBoxDownload/1/cq/cache_206923/ResServerlist.txt_206923"
- import json as _j
- with open(cache) as f:
- d2 = _j.load(f)
- for gid, g in d2.items():
- for s in g.get("tree", []):
- if str(s.get("d")) == "14414741":
- print(f"FOUND in cache: {gid}")
- print(_j.dumps(s, ensure_ascii=False, indent=2))
- return
- asyncio.run(main())
|