猿人学第20题-wasm

This commit is contained in:
aiguigu 2022-07-19 05:26:23 +08:00
parent 10a77ae2d9
commit adb80a7a05
6 changed files with 65 additions and 1 deletions

BIN
img/91.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

BIN
img/92.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

BIN
img/93.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

View File

@ -0,0 +1,7 @@
import requests
url = "https://pass.tmall.com/add"
response = requests.request("GET", url)
print(response.headers)

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,34 @@
import requests
import time
import json
import hashlib
url = " https://match.yuanrenxue.com/api/match/20?page={}&sign={}&t={}"
def get_res(page):
Headers = {
"User-Agent": "yuanrenxue.project",
"cookie": "sessionid=kivvuwmza629j35a52d4azpxb7hzd9xy;"
}
t = int(time.time() * 1000)
sign_item = f"{page}|{t}D#uqGdcw41pWeNXm"
sign = hashlib.md5(sign_item.encode(encoding='UTF-8')).hexdigest()
res = requests.get(url=url.format(page, sign, t), headers=Headers)
res_dict = json.loads(res.text)
print(res_dict)
data_list = res_dict.get('data')
sum_value = 0
for data in data_list:
value = data.get('value')
sum_value += value
return sum_value
all_sum_value = 0
for i in range(1, 6):
sum_value = get_res(i)
all_sum_value += sum_value
print(all_sum_value)