import json import requests from hashlib import md5 def get_md5(s): m = md5() m.update(s.encode()) return m.hexdigest() n="{app_id=98357f659cf8fb6001cff80f7c6b85f2&diploma_id=7&page=4&page_len=20&platform=desktop&ts=1723344065728&v=210&wenli=0}&key=146fd1e66513611ac7af69f21f1d7725" sign = get_md5(n) headers = { 'accept': 'application/json, text/plain, */*', 'accept-language': 'zh-CN,zh;q=0.9', 'cache-control': 'no-cache', 'pragma': 'no-cache', 'priority': 'u=1, i', 'referer': 'https://www.jizhy.com/44/rank/school', 'sec-ch-ua': '"Not)A;Brand";v="99", "Google Chrome";v="127", "Chromium";v="127"', 'sec-ch-ua-mobile': '?0', 'sec-ch-ua-platform': '"Windows"', 'sec-fetch-dest': 'empty', 'sec-fetch-mode': 'cors', 'sec-fetch-site': 'same-origin', 'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36', } params = { 'page': '4', 'page_len': '20', 'diploma_id': '7', 'wenli': '0', 'app_id': '98357f659cf8fb6001cff80f7c6b85f2', 'ts': '1723344065728', 'platform': 'desktop', 'v': '210', 'sign': sign, } # response = requests.get('https://www.jizhy.com/open/sch/rank-list', params=params, cookies=cookies, headers=headers)/sch/rank-list?page=1&page_len=20&diploma_id=7&wenli=0&app_id=98357f659cf8fb6001cff80f7c6b85f2&ts=1723343996655&platform=desktop&v=210&sign=AB23EA23842662A22BDC3E6F3552914C # https://www.jizhy.com/open/sch/rank-list?page=2&page_len=20&diploma_id=7&wenli=0&app_id=98357f659cf8fb6001cff80f7c6b85f2&ts=1723344065728&platform=desktop&v=210&sign=82148D68788FEFD79A7241EC764F6EF3 response = requests.get('https://www.jizhy.com/open/sch/rank-list', params=params, cookies=cookies, headers=headers) context = json.loads(response.text) print(context) for school in context['data']['sch_list']: s_name= school['sch_name'] s_score= school['sch_rank_score'] print(s_name,s_score)标签:sch,rank,sign,sec,js,id,加密算法,page From: https://blog.csdn.net/lfsysc/article/details/141102833