30 lines
822 B
Python
30 lines
822 B
Python
import re
|
|||
|
|
import requests
|
||
|
|
|
||
|
|
js = requests.get(
|
||
|
|
"https://www.gongzicp.com/assets/index.eef719ce.js",
|
||
|
|
timeout=90,
|
||
|
|
headers={"User-Agent": "Mozilla/5.0"},
|
||
|
|
).text
|
||
|
|
for pat in [r"novel/[a-zA-Z]+", r"chapter/[a-zA-Z]+", r"search[A-Za-z]+", r"read/[a-zA-Z]+"]:
|
||
|
|
found = sorted(set(re.findall(pat, js)))
|
||
|
|
print(pat, found[:30])
|
||
|
|
|
||
|
|
# find Fg assignment
|
||
|
|
idx = js.find("function Fg")
|
||
|
|
if idx < 0:
|
||
|
|
idx = js.find("Fg=")
|
||
|
|
print("Fg at", idx)
|
||
|
|
if idx >= 0:
|
||
|
|
print(js[idx:idx+800])
|
||
|
|
|
||
|
|
# download InfoH5 chunk
|
||
|
|
chunk = requests.get(
|
||
|
|
"https://www.gongzicp.com/assets/InfoH5.37080396.js",
|
||
|
|
timeout=60,
|
||
|
|
headers={"User-Agent": "Mozilla/5.0"},
|
||
|
|
).text
|
||
|
|
print("InfoH5 len", len(chunk))
|
||
|
|
for pat in [r"apiv2[^\"']{0,60}", r"/novel[^\"']{0,60}", r"chapter[^\"']{0,40}"]:
|
||
|
|
m = re.findall(pat, chunk)
|
||
|
|
print(pat, m[:15])
|