29 lines
851 B
Python
29 lines
851 B
Python
import json
|
|
import requests
|
|
|
|
UA = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) Chrome/124.0.0.0"
|
|
BASE = "https://www.gongzicp.com"
|
|
WEBAPI = BASE + "/webapi"
|
|
headers = {
|
|
"User-Agent": UA,
|
|
"Referer": BASE + "/",
|
|
"Accept": "application/json, text/plain, */*",
|
|
}
|
|
|
|
paths = [
|
|
"/home/typeList?tid=75&page=1&num=10",
|
|
"/home/getTypeList?tid=75&page=1&num=10",
|
|
"/novel/getTypeNovelList?type_id=75&page=1&num=10",
|
|
"/novel/novelListByType?type_id=75&page=1&num=10",
|
|
"/rank/getRankList?type=1&page=1&num=10",
|
|
"/novel/getRankNovelList?rank_type=1&page=1&num=10",
|
|
]
|
|
for p in paths:
|
|
try:
|
|
r = requests.get(WEBAPI + p, headers=headers, timeout=30)
|
|
text = r.text
|
|
if '"code":200' in text or '"code": 200' in text:
|
|
print("OK", p, text[:400])
|
|
except Exception as ex:
|
|
print("ERR", p, ex)
|