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, */*", } def get(path, **params): r = requests.get(WEBAPI + path, params=params, headers=headers, timeout=30) print(path, params, r.status_code, r.text[:500]) return r get("/search/novels", keyword="天官", page=1, num=5) get("/novel/novelList", type_id=75, page=1, num=5) get("/novel/typeGetList") get("/novel/typeGetInfo", type_id=75)