|
|
@ -34,9 +34,16 @@ def check_logic_error() : |
|
|
|
|
|
|
|
response = requests.request("GET", url, headers=headers, data=payload) |
|
|
|
|
|
|
|
print(response.text) |
|
|
|
response = json.loads(response.text) |
|
|
|
# print(response) |
|
|
|
data = response['data'] |
|
|
|
name = data['name'] |
|
|
|
prob = data['prob'] |
|
|
|
checkinfo = list(zip(name, prob)) |
|
|
|
print(checkinfo) |
|
|
|
with open('check_logic_error.txt', 'w', encoding='utf-8', newline='') as f: # 设置文件对象 |
|
|
|
f.write(response.text) # 将字符串写入文件中 |
|
|
|
f.write(checkinfo) # 将字符串写入文件中 |
|
|
|
f.close() |
|
|
|
return response.text |
|
|
|
|
|
|
|
return checkinfo |
|
|
|
|