python post获得的json数据看不懂求指导一下
本帖最后由 star0angel 于 2024-5-24 08:54 编辑headers = {
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7",
"Accept-Encoding": "gzip, deflate,zstd",
"Accept-Language": "zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6",
"Cookie": "__51vcke__3HukqLVSk25b1pcH=3f24c1f3-a947-507b-84c9-6657251e23d1; __51vuft__3HukqLVSk25b1pcH=1716463071310; check_url=yes; cf_clearance=hpLjMqKtopLsjaJyuwSkrlIrv6pVy1GCX11CFx9tanU-1716479313-1.0.1.1-zsq7iQtjVT5Bt0PSz7BRzrw0kvX1WAMmdfv.7Pi3yOgHBUb2NA5iXdh56a2qITq4ZNGSa0P_UFCdaq2yEOx_eg; check_cookie=yes; PHPSESSID=fe14kceo3f7lvn03nmuq3eti55; __51uvsct__3HukqLVSk25b1pcH=4; __vtins__3HukqLVSk25b1pcH=%7B%22sid%22%3A%20%22a92ca5d2-6af2-52e8-99fb-1c10d250ec74%22%2C%20%22vd%22%3A%207%2C%20%22stt%22%3A%202133548%2C%20%22dr%22%3A%205622%2C%20%22expires%22%3A%201716487865636%2C%20%22ct%22%3A%201716486065636%7D",
"Referer": "https://www.bqzw789.org/146/146133/46486451.html",
"Sec-Ch-Ua": "\"Microsoft Edge\";v=\"123\", \"Not:A-Brand\";v=\"8\", \"Chromium\";v=\"123\"",
"Sec-Ch-Ua-Arch": "\"x86\"",
"Sec-Ch-Ua-Bitness": "\"64\"",
"Sec-Ch-Ua-Full-Version": "\"123.0.2420.97\"",
"Sec-Ch-Ua-Full-Version-List": "\"Microsoft Edge\";v=\"123.0.2420.97\", \"Not:A-Brand\";v=\"8.0.0.0\", \"Chromium\";v=\"123.0.6312.123\"",
"Sec-Ch-Ua-Mobile": "?0",
"Sec-Ch-Ua-Model": "\"\"",
"Sec-Ch-Ua-Platform": "\"Windows\"",
"Sec-Ch-Ua-Platform-Version": "\"15.0.0\"",
"Sec-Fetch-Dest": "document",
"Sec-Fetch-Mode": "navigate",
"Sec-Fetch-Site": "same-origin",
"Sec-Fetch-User": "?1",
"Upgrade-Insecure-Requests": "1",
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36 Edg/123.0.0.0"
}
url = 'https://www.bqzw789.org/ajaxChapter.php'
data ={
"aid": "146133",
"cid": "46486451",
}
response = requests.post(url, data=data, headers=headers)
response.encoding = 'utf-8'
print(response.text)
print(response.json())
请教一下这些怎么转换成正常的中文试过resp.encoding = "utf-8" "gbk"什么的都没什么用 现在这么多AI,直接交给AI,比坛友回答更靠谱,速度还快 paoxueyuan 发表于 2024-5-24 08:55
现在这么多AI,直接交给AI,比坛友回答更靠谱,速度还快
试过了 没问出来{:1_907:} https://pic.imgdb.cn/item/664fe75fd9c307b7e9f845c7.jpg
其它你response.json() 就是正确的数据,text是unicode编码的 不是编码的问题是网站加密了 笔趣阁是字体加密,要解密的 现在的AI都可以帮助你一步一步扣JS代码了,解决这种小问题真的小case 妥妥碰到了"字体反爬",链接给你备好:
论字体反爬通杀
https://www.52pojie.cn/thread-1860909-1-1.html
(出处: 吾爱破解论坛)
有网站自己的字体,字体文件:https://ziyuan.bqg789.com/fonts/bqg.ttf y761110576 发表于 2024-5-24 09:22
有网站自己的字体,字体文件:https://ziyuan.bqg789.com/fonts/bqg.ttf
这个怎么用