Files
SakuraHub/tools/probe_gongzicp3.py
T

19 lines
502 B
Python
Raw Normal View History

2026-11-16 20:45:22 +08:00
import re
import requests
js = requests.get(
"https://www.gongzicp.com/assets/index.eef719ce.js",
headers={"User-Agent": "Mozilla/5.0"},
timeout=90,
).text
for needle in ["webapi", "novel", "chapter", "search", "read"]:
idx = 0
found = 0
while found < 15:
i = js.find(needle, idx)
if i < 0:
break
snippet = js[max(0, i - 40) : i + 80]
print("---", needle, snippet.replace("\n", " "))
idx = i + len(needle)
found += 1