ctx = execjs.compile('function exec_js() { return ' + jscode + '; }') result = ctx.call('exec_js') print(result) cookies = {} key, value = result.strip().split('=', 1) cookies[key] = value s.cookies.update(cookies)
num=[]
getdaturl="https://match.yuanrenxue.cn/api/match/13?page={}" for i inrange (1,6): # print(s.get(getdaturl.format(i),proxies=proxy,verify=False).text) data = json.loads(s.get(getdaturl.format(i),proxies=proxy,verify=False).text) values = [item['value'] for item in data['data']] num=num+values