mirror of
https://github.com/luzhisheng/js_reverse.git
synced 2025-04-19 18:24:51 +08:00
猿人学第20题-wasm
This commit is contained in:
parent
10a77ae2d9
commit
adb80a7a05
BIN
img/91.png
Normal file
BIN
img/91.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.4 KiB |
BIN
img/92.png
Normal file
BIN
img/92.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 11 KiB |
BIN
img/93.png
Normal file
BIN
img/93.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.1 KiB |
7
taobao-h5-搜索/天貓評論.py
Normal file
7
taobao-h5-搜索/天貓評論.py
Normal 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
34
猿人学第20题-wasm/测试.py
Normal file
34
猿人学第20题-wasm/测试.py
Normal 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)
|
Loading…
x
Reference in New Issue
Block a user