Browse Source

上传文件至 'be'

pull/2/head
gitea.shuishan 3 years ago
parent
commit
41189104ca
1 changed files with 10 additions and 3 deletions
  1. +10
    -3
      be/my_check_logic_error.py

+ 10
- 3
be/my_check_logic_error.py View File

@ -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

Loading…
Cancel
Save