import requests
import re
s = requests.Session()
cookie_ ={'sessionid':'',}
s.cookies.update(cookie_)
url = 'https://match.yuanrenxue.com/match/13?'
rsp = s.get(url,verify=False)
cookies = re.findall("'([a-zA-Z0-9=_|])'", rsp.text)
yuanrenxue_cookie = ''.join(cookies)
key, value = yuanrenxue_cookie.split('=')
s.cookies.update({key:value})
header_={'User-Agent': 'yuanrenxue.project',}
s.headers = header_
if __name__ == '__main__':
num_list = []
for i in range(1,6):
url = "https://match.yuanrenxue.com/api/match/13?page={}".format(i)
r = s.get(url,verify=False).json()
data = r["data"]
print(data)
[num_list.append(i["value"]) for i in data]
print(sum(num_list))