first commit

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
kunkunxiaomaoandClaude committed 2026-11-16 20:45:22 +08:00
commit 9c5fef1a4d
412 files changed
+94582

No files matched your search

+39
View File
@@ -0,0 +1,39 @@
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 ["apiv2", "getNovel", "searchNovel", "chapter", "readChapter"]:
idx = 0
found = 0
while found < 8:
i = js.find(needle, idx)
if i < 0:
break
snippet = js[max(0, i - 30) : i + 100]
print("---", needle, snippet.replace("\n", " "))
idx = i + len(needle)
found += 1
API = "https://api1.gongzicp.com/apiv2"
headers = {
"User-Agent": "Mozilla/5.0",
"Referer": "https://www.gongzicp.com/",
"Origin": "https://www.gongzicp.com",
}
paths = [
"/novel/info?novel_id=429598",
"/novel/info?novelId=429598",
"/novel/detail?novel_id=429598",
"/novel/chapter/list?novel_id=429598",
"/chapter/list?novel_id=429598",
"/search/novel?keyword=天官",
"/searchNovel?keyword=天官",
"/novel/search?keyword=天官",
]
for p in paths:
r = requests.get(API + p, headers=headers, timeout=30)
print(p, r.status_code, r.text[:400])