26 lines
1.0 KiB
Python
26 lines
1.0 KiB
Python
import re
|
|||
|
|
import requests
|
||
|
|
|
||
|
|
for chunk in ["CpListData.97f05acb.js", "CpListData.b8c8c8c8.js"]:
|
||
|
|
try:
|
||
|
|
t = requests.get(f"https://www.gongzicp.com/assets/{chunk}", timeout=30).text
|
||
|
|
print(chunk, "found", len(t))
|
||
|
|
for m in re.finditer(r".{0,100}search.{0,100}", t, re.I):
|
||
|
|
if "novel" in m.group().lower():
|
||
|
|
print(m.group()[:220])
|
||
|
|
except Exception as ex:
|
||
|
|
print(chunk, ex)
|
||
|
|
|
||
|
|
# list assets matching CpListData
|
||
|
|
html = requests.get("https://www.gongzicp.com/", timeout=30).text
|
||
|
|
for m in re.finditer(r"CpListData\.[a-f0-9]+\.js", html):
|
||
|
|
print(m.group())
|
||
|
|
|
||
|
|
t = requests.get("https://www.gongzicp.com/assets/index.eef719ce.js", timeout=60).text
|
||
|
|
for m in re.finditer(r"CpListData\.[a-f0-9]+\.js", t):
|
||
|
|
chunk = m.group()
|
||
|
|
print("loading", chunk)
|
||
|
|
ct = requests.get(f"https://www.gongzicp.com/assets/{chunk}", timeout=30).text
|
||
|
|
for m2 in re.finditer(r"params:\{[^}]{0,200}\}", ct):
|
||
|
|
if "search" in m2.group().lower() or "word" in m2.group().lower():
|
||
|
|
print(m2.group())
|