feat: 添加多个功能模块和工具脚本
- 新增websocket客户端和服务端实现 - 添加图片压缩工具和快速压缩脚本 - 实现学生信息处理相关API - 添加MQTT客户端和消息处理功能 - 更新.gitignore忽略更多文件类型 - 添加数据库操作工具和示例 - 实现多个测试脚本和工具类
This commit is contained in:
@@ -1,26 +1,5 @@
|
||||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 1,
|
||||
"id": "bc441afe",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"import pandas as pd\n",
|
||||
"df = pd.read_excel('重新分班模板 (3).xlsx')"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 3,
|
||||
"id": "bd93b7eb",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"df.sort_values(by='新班级',inplace=True)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
|
||||
+3734
-1232
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,123 @@
|
||||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 1,
|
||||
"id": "686215f8",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"from requests import get,post\n",
|
||||
"import time\n",
|
||||
"ip = \"http://band.hxzhxy.cn\"\n",
|
||||
"param = {\n",
|
||||
" \"username\": \"zhongwei\",\n",
|
||||
" \"password\": \"123456a\",\n",
|
||||
" \"client_id\": \"client\",\n",
|
||||
" \"grant_type\": \"password\",\n",
|
||||
" \"client_secret\": \"123456\",\n",
|
||||
"}\n",
|
||||
"data = get(url=f\"http://band.hxzhxy.cn/oauth/token?username=zhongwei&password=123456a&client_id=client&grant_type=password&client_secret=123456\").json()\n",
|
||||
"token = data[\"access_token\"]\n",
|
||||
"header = {\n",
|
||||
" \"content-type\": \"application/json\",\n",
|
||||
" \"authorization\": f\"Bearer {token}\",\n",
|
||||
"}"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 2,
|
||||
"id": "63e34092",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"ids = [36, 56,95,96,146,223,234,331,392,397,398,406,416,419,420]"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 4,
|
||||
"id": "775850cb",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"'36&ids=56&ids=95&ids=96&ids=146&ids=223&ids=234&ids=331&ids=392&ids=397&ids=398&ids=406&ids=416&ids=419&ids=420'"
|
||||
]
|
||||
},
|
||||
"execution_count": 4,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"\"&ids=\".join([str(i) for i in ids])"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 5,
|
||||
"id": "6b68dc63",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"url = 'https://www.hxzhxy.cn/hxyd-api/uc/role/grant/235?ids=36&ids=56&ids=95&ids=96&ids=146&ids=223&ids=234&ids=331&ids=392&ids=397&ids=398&ids=406&ids=416&ids=419&ids=420&access_token=a0db0a6f-0b16-4948-8d8b-4a0b6ab15f90'"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"id": "3140ac56",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"{'success': True, 'msg': '操作成功', 'code': 0, 'data': None}"
|
||||
]
|
||||
},
|
||||
"execution_count": 7,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
},
|
||||
{
|
||||
"ename": "",
|
||||
"evalue": "",
|
||||
"output_type": "error",
|
||||
"traceback": [
|
||||
"\u001b[1;31m在当前单元格或上一个单元格中执行代码时 Kernel 崩溃。\n",
|
||||
"\u001b[1;31m请查看单元格中的代码,以确定故障的可能原因。\n",
|
||||
"\u001b[1;31m单击<a href='https://aka.ms/vscodeJupyterKernelCrash'>此处</a>了解详细信息。\n",
|
||||
"\u001b[1;31m有关更多详细信息,请查看 Jupyter <a href='command:jupyter.viewOutput'>log</a>。"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"post(url=url,headers=header).json()"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"kernelspec": {
|
||||
"display_name": "base",
|
||||
"language": "python",
|
||||
"name": "python3"
|
||||
},
|
||||
"language_info": {
|
||||
"codemirror_mode": {
|
||||
"name": "ipython",
|
||||
"version": 3
|
||||
},
|
||||
"file_extension": ".py",
|
||||
"mimetype": "text/x-python",
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.12.4"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 5
|
||||
}
|
||||
@@ -0,0 +1,285 @@
|
||||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 1,
|
||||
"id": "1b945caa",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"from requests import get,post"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"id": "e426f09e",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"header = {\n",
|
||||
" \"Cookie\":r\"JSESSIONID=C1476EB5E872A77EF5247FB49991C59D; session=%7B%22username%22%3A%22admin%22%2C%22roleId%22%3A1%7D\"\n",
|
||||
"}\n",
|
||||
"myData={\n",
|
||||
" \"nvr34\":{\n",
|
||||
" 34020000001110000347},\n",
|
||||
" \"nvr33\":34020000001110000033,\n",
|
||||
" \"nvr35\":34020000001110000021\n",
|
||||
"}\n",
|
||||
"# nvr34= 34020000001110000347\n",
|
||||
"# nvr33 = 34020000001110000033\n",
|
||||
"nvr35 = 34020000001110000021\n",
|
||||
"data = get(f\"http://10.19.64.39:18820/api/device/query/devices/{nvr35}/channels?page=1&count=400&query=&online=&channelType=\",headers=header).json()\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 13,
|
||||
"id": "7f73ee83",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"{'PTZType': 3,\n",
|
||||
" 'PTZTypeText': '固定枪机',\n",
|
||||
" 'address': '192.9.9.107',\n",
|
||||
" 'block': '',\n",
|
||||
" 'businessGroupId': '',\n",
|
||||
" 'certNum': '',\n",
|
||||
" 'certifiable': 0,\n",
|
||||
" 'channelId': '34020000001320000001',\n",
|
||||
" 'channelType': 0,\n",
|
||||
" 'civilCode': 'CivilCode',\n",
|
||||
" 'createTime': '',\n",
|
||||
" 'deviceId': '34020000001110000021',\n",
|
||||
" 'errCode': 0,\n",
|
||||
" 'gpsTime': '2024-04-19 11:38:33',\n",
|
||||
" 'hasAudio': False,\n",
|
||||
" 'id': 1158,\n",
|
||||
" 'ipAddress': '',\n",
|
||||
" 'latitude': 0.0,\n",
|
||||
" 'latitudeGcj02': 0.0,\n",
|
||||
" 'latitudeWgs84': 0.0,\n",
|
||||
" 'longitude': 0.0,\n",
|
||||
" 'longitudeGcj02': 0.0,\n",
|
||||
" 'longitudeWgs84': 0.0,\n",
|
||||
" 'manufacture': 'Manufacturer',\n",
|
||||
" 'model': 'Camera',\n",
|
||||
" 'name': '1楼电梯间',\n",
|
||||
" 'owner': 'Owner',\n",
|
||||
" 'parentId': '',\n",
|
||||
" 'parental': 0,\n",
|
||||
" 'password': '',\n",
|
||||
" 'port': 0,\n",
|
||||
" 'registerWay': 1,\n",
|
||||
" 'safetyWay': 0,\n",
|
||||
" 'secrecy': '0',\n",
|
||||
" 'status': 1,\n",
|
||||
" 'streamId': '',\n",
|
||||
" 'subCount': 0,\n",
|
||||
" 'updateTime': ''}"
|
||||
]
|
||||
},
|
||||
"execution_count": 13,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"data[\"data\"][\"list\"][0]"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 14,
|
||||
"id": "749b99ed",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"192.9.9.107\n",
|
||||
"192.9.9.108\n",
|
||||
"192.9.9.109\n",
|
||||
"192.9.9.110\n",
|
||||
"192.9.9.111\n",
|
||||
"192.9.9.112\n",
|
||||
"192.9.9.113\n",
|
||||
"192.9.9.114\n",
|
||||
"192.9.9.115\n",
|
||||
"192.9.9.116\n",
|
||||
"192.9.9.117\n",
|
||||
"192.9.9.118\n",
|
||||
"192.9.9.119\n",
|
||||
"192.9.9.120\n",
|
||||
"192.9.9.121\n",
|
||||
"192.9.9.122\n",
|
||||
"192.9.9.123\n",
|
||||
"192.9.9.124\n",
|
||||
"192.9.9.125\n",
|
||||
"192.9.9.127\n",
|
||||
"192.9.9.126\n",
|
||||
"192.9.9.129\n",
|
||||
"192.9.9.128\n",
|
||||
"192.9.9.130\n",
|
||||
"192.9.9.131\n",
|
||||
"192.9.9.132\n",
|
||||
"192.9.9.133\n",
|
||||
"192.9.9.134\n",
|
||||
"192.9.9.135\n",
|
||||
"192.9.9.136\n",
|
||||
"192.9.9.137\n",
|
||||
"192.9.9.138\n",
|
||||
"192.9.9.139\n",
|
||||
"192.9.9.140\n",
|
||||
"192.9.9.141\n",
|
||||
"192.9.9.142\n",
|
||||
"192.9.9.143\n",
|
||||
"192.9.9.1\n",
|
||||
"192.9.9.144\n",
|
||||
"192.9.9.146\n",
|
||||
"192.9.9.147\n",
|
||||
"192.9.9.148\n",
|
||||
"192.9.9.149\n",
|
||||
"192.9.9.150\n",
|
||||
"192.9.9.151\n",
|
||||
"192.9.9.152\n",
|
||||
"192.9.9.153\n",
|
||||
"192.9.9.154\n",
|
||||
"192.9.9.156\n",
|
||||
"192.9.9.155\n",
|
||||
"192.9.9.158\n",
|
||||
"192.9.9.159\n",
|
||||
"192.9.9.188\n",
|
||||
"192.9.9.160\n",
|
||||
"192.9.9.161\n",
|
||||
"192.9.9.162\n",
|
||||
"192.9.9.163\n",
|
||||
"192.9.9.164\n",
|
||||
"192.9.9.165\n",
|
||||
"192.9.9.166\n",
|
||||
"192.9.9.167\n",
|
||||
"192.9.9.168\n",
|
||||
"192.9.9.169\n",
|
||||
"192.9.9.170\n",
|
||||
"192.9.9.171\n",
|
||||
"192.9.9.172\n",
|
||||
"192.9.9.173\n",
|
||||
"192.9.9.174\n",
|
||||
"192.9.9.175\n",
|
||||
"192.9.9.176\n",
|
||||
"192.9.9.177\n",
|
||||
"192.9.9.178\n",
|
||||
"192.9.9.179\n",
|
||||
"192.9.9.180\n",
|
||||
"192.9.9.181\n",
|
||||
"192.9.9.182\n",
|
||||
"192.9.9.183\n",
|
||||
"192.9.9.184\n",
|
||||
"192.9.9.185\n",
|
||||
"192.9.9.186\n",
|
||||
"192.9.9.187\n",
|
||||
"192.9.9.189\n",
|
||||
"192.9.9.190\n",
|
||||
"192.9.9.191\n",
|
||||
"192.9.9.192\n",
|
||||
"192.9.9.193\n",
|
||||
"192.9.9.194\n",
|
||||
"0.0.0.0\n",
|
||||
"0.0.0.0\n",
|
||||
"0.0.0.0\n",
|
||||
"0.0.0.0\n",
|
||||
"0.0.0.0\n",
|
||||
"0.0.0.0\n",
|
||||
"0.0.0.0\n",
|
||||
"0.0.0.0\n",
|
||||
"0.0.0.0\n",
|
||||
"0.0.0.0\n",
|
||||
"0.0.0.0\n",
|
||||
"0.0.0.0\n",
|
||||
"0.0.0.0\n",
|
||||
"0.0.0.0\n",
|
||||
"0.0.0.0\n",
|
||||
"0.0.0.0\n",
|
||||
"0.0.0.0\n",
|
||||
"0.0.0.0\n",
|
||||
"0.0.0.0\n",
|
||||
"0.0.0.0\n",
|
||||
"0.0.0.0\n",
|
||||
"0.0.0.0\n",
|
||||
"0.0.0.0\n",
|
||||
"0.0.0.0\n",
|
||||
"0.0.0.0\n",
|
||||
"0.0.0.0\n",
|
||||
"0.0.0.0\n",
|
||||
"0.0.0.0\n",
|
||||
"0.0.0.0\n",
|
||||
"0.0.0.0\n",
|
||||
"0.0.0.0\n",
|
||||
"0.0.0.0\n",
|
||||
"0.0.0.0\n",
|
||||
"0.0.0.0\n",
|
||||
"0.0.0.0\n",
|
||||
"0.0.0.0\n",
|
||||
"0.0.0.0\n",
|
||||
"0.0.0.0\n",
|
||||
"0.0.0.0\n",
|
||||
"0.0.0.0\n",
|
||||
"0.0.0.0\n",
|
||||
"Address\n",
|
||||
"Address\n",
|
||||
"Address\n",
|
||||
"Address\n",
|
||||
"Address\n",
|
||||
"Address\n",
|
||||
"Address\n",
|
||||
"Address\n",
|
||||
"Address\n",
|
||||
"Address\n",
|
||||
"Address\n",
|
||||
"Address\n",
|
||||
"Address\n",
|
||||
"Address\n",
|
||||
"Address\n",
|
||||
"Address\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"for item in data[\"data\"][\"list\"]:\n",
|
||||
" print(item[\"address\"])"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"id": "b3eca058",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": []
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"kernelspec": {
|
||||
"display_name": "base",
|
||||
"language": "python",
|
||||
"name": "python3"
|
||||
},
|
||||
"language_info": {
|
||||
"codemirror_mode": {
|
||||
"name": "ipython",
|
||||
"version": 3
|
||||
},
|
||||
"file_extension": ".py",
|
||||
"mimetype": "text/x-python",
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.12.4"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 5
|
||||
}
|
||||
+10
-29
@@ -29,44 +29,25 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 2,
|
||||
"execution_count": null,
|
||||
"id": "3c046d8d",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"<html>\n",
|
||||
"<head><title>404 Not Found</title></head>\n",
|
||||
"<body bgcolor=\"white\">\n",
|
||||
"<center><h1>404 Not Found</h1></center>\n",
|
||||
"<hr><center>nginx/1.4.0</center>\n",
|
||||
"</body>\n",
|
||||
"</html>\n",
|
||||
"\n",
|
||||
"<html>\n",
|
||||
"<head><title>404 Not Found</title></head>\n",
|
||||
"<body bgcolor=\"white\">\n",
|
||||
"<center><h1>404 Not Found</h1></center>\n",
|
||||
"<hr><center>nginx/1.4.0</center>\n",
|
||||
"</body>\n",
|
||||
"</html>\n",
|
||||
"\n",
|
||||
"<html>\n",
|
||||
"<head><title>404 Not Found</title></head>\n",
|
||||
"<body bgcolor=\"white\">\n",
|
||||
"<center><h1>404 Not Found</h1></center>\n",
|
||||
"<hr><center>nginx/1.4.0</center>\n",
|
||||
"</body>\n",
|
||||
"</html>\n",
|
||||
"\n"
|
||||
"ename": "",
|
||||
"evalue": "",
|
||||
"output_type": "error",
|
||||
"traceback": [
|
||||
"\u001b[1;31m在当前单元格或上一个单元格中执行代码时 Kernel 崩溃。\n",
|
||||
"\u001b[1;31m请查看单元格中的代码,以确定故障的可能原因。\n",
|
||||
"\u001b[1;31m单击<a href='https://aka.ms/vscodeJupyterKernelCrash'>此处</a>了解详细信息。\n",
|
||||
"\u001b[1;31m有关更多详细信息,请查看 Jupyter <a href='command:jupyter.viewOutput'>log</a>。"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"for i in range(24,27):\n",
|
||||
" print(post(f\"{ip}/classAttendStu/createThisWeek\",headers=header,params={\"planId\":i},timeout=600).text)"
|
||||
" post(f\"{ip}/classAttendStu/createThisWeek\",headers=header,params={\"planId\":i},timeout=600).text"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
@@ -0,0 +1,196 @@
|
||||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 1,
|
||||
"id": "16e6d922",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"from requests import get,post\n",
|
||||
"import pandas as pd\n",
|
||||
"import time\n",
|
||||
"teamId = 19\n",
|
||||
"ip = \"http://band.hxzhxy.cn\"\n",
|
||||
"param = {\n",
|
||||
" \"username\": \"zhongwei\",\n",
|
||||
" \"password\": \"123456a\",\n",
|
||||
" \"client_id\": \"client\",\n",
|
||||
" \"grant_type\": \"password\",\n",
|
||||
" \"client_secret\": \"123456\",\n",
|
||||
"}\n",
|
||||
"data = get(url=f\"http://band.hxzhxy.cn/oauth/token?username=zhongwei&password=123456a&client_id=client&grant_type=password&client_secret=123456\").json()\n",
|
||||
"token = data[\"access_token\"]\n",
|
||||
"header = {\n",
|
||||
" \"content-type\": \"application/json\",\n",
|
||||
" \"authorization\": f\"Bearer {token}\",\n",
|
||||
"}"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 2,
|
||||
"id": "e2f2a890",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"#25届\n",
|
||||
"studentInfos = get(f\"https://www.hxzhxy.cn/hxyd-api/uc/student/pageInfo?teamId=19&gradeId=124&type=0&pageSize=500&pageNumber=0&orderDirection=asc&access_token={token}\").json()[\"data\"][\"content\"]"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"id": "d7d3c7b0",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# studentInfos = get(f\"https://www.hxzhxy.cn/hxyd-api/uc/student/pageInfo?teamId=19&gradeId=120&name=&type=0&pageSize=30&pageNumber=1&orderDirection=asc&access_token={token}\").json()[\"data\"][\"content\"]"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 23,
|
||||
"id": "49b6ff40",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"import time\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 34,
|
||||
"id": "77ce4d27",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"def getSportInfo(wristbandNo):\n",
|
||||
" my_time = time.time()*1000\n",
|
||||
" res = get(f\"{ip}/parent/band/day\",params={\n",
|
||||
" \"date\":1762504686000,\n",
|
||||
" \"wristbandNo\":wristbandNo,\n",
|
||||
" },headers=header).json()\n",
|
||||
" print(res)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"id": "fbe938af",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"白芮羽 未改密码,0个联系方式未绑定\n",
|
||||
"白宇强 未改密码,0个联系方式未绑定\n",
|
||||
"曾妙涵 未改密码,0个联系方式未绑定\n",
|
||||
"曾奕璟 未改密码,1个联系方式未绑定\n",
|
||||
"陈佳逸 未改密码,2个联系方式未绑定\n",
|
||||
"陈奕冰 未改密码,1个联系方式未绑定\n",
|
||||
"陈雨泽 未改密码,0个联系方式未绑定\n",
|
||||
"程彦萌 未改密码,0个联系方式未绑定\n",
|
||||
"崔绪程 未改密码,1个联系方式未绑定\n",
|
||||
"邓馨怡 未改密码,1个联系方式未绑定\n",
|
||||
"邓雅心 未改密码,0个联系方式未绑定\n",
|
||||
"丁晨曦 未改密码,0个联系方式未绑定\n",
|
||||
"董思淇 未改密码,0个联系方式未绑定\n",
|
||||
"董思睿 未改密码,1个联系方式未绑定\n",
|
||||
"段梓锽 未改密码,1个联系方式未绑定\n",
|
||||
"樊子妘 未改密码,1个联系方式未绑定\n",
|
||||
"樊梓皓 未改密码,1个联系方式未绑定\n",
|
||||
"方一渊 未改密码,1个联系方式未绑定\n",
|
||||
"付琦宁 未改密码,0个联系方式未绑定\n",
|
||||
"甘浩源 未改密码,1个联系方式未绑定\n",
|
||||
"高竟然 未改密码,1个联系方式未绑定\n",
|
||||
"苟语欣 未改密码,0个联系方式未绑定\n",
|
||||
"苟紫阳 未改密码,0个联系方式未绑定\n",
|
||||
"何柏翰 未改密码,0个联系方式未绑定\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"ename": "KeyboardInterrupt",
|
||||
"evalue": "",
|
||||
"output_type": "error",
|
||||
"traceback": [
|
||||
"\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
|
||||
"\u001b[1;31mKeyboardInterrupt\u001b[0m Traceback (most recent call last)",
|
||||
"Cell \u001b[1;32mIn[4], line 4\u001b[0m\n\u001b[0;32m 2\u001b[0m userName \u001b[38;5;241m=\u001b[39m stu[\u001b[38;5;124m'\u001b[39m\u001b[38;5;124muserName\u001b[39m\u001b[38;5;124m'\u001b[39m]\n\u001b[0;32m 3\u001b[0m stuNo\u001b[38;5;241m=\u001b[39m \u001b[38;5;124mf\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;132;01m{\u001b[39;00mstu[\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mstuNo\u001b[39m\u001b[38;5;124m'\u001b[39m]\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124ma\u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[1;32m----> 4\u001b[0m res \u001b[38;5;241m=\u001b[39m get(\u001b[38;5;124mf\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;132;01m{\u001b[39;00mip\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m/oauth/token?username=\u001b[39m\u001b[38;5;132;01m{\u001b[39;00muserName\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m&password=\u001b[39m\u001b[38;5;132;01m{\u001b[39;00mstuNo\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m&client_id=client&grant_type=password&client_secret=123456\u001b[39m\u001b[38;5;124m\"\u001b[39m)\u001b[38;5;241m.\u001b[39mjson()\n\u001b[0;32m 5\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m res\u001b[38;5;241m.\u001b[39mget(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124maccess_token\u001b[39m\u001b[38;5;124m\"\u001b[39m,\u001b[38;5;28;01mFalse\u001b[39;00m) \u001b[38;5;129;01mand\u001b[39;00m stu[\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mtype\u001b[39m\u001b[38;5;124m\"\u001b[39m]\u001b[38;5;241m==\u001b[39m\u001b[38;5;241m5\u001b[39m:\n\u001b[0;32m 6\u001b[0m count \u001b[38;5;241m=\u001b[39m \u001b[38;5;241m2\u001b[39m\n",
|
||||
"File \u001b[1;32md:\\Anaconda3\\Lib\\site-packages\\requests\\api.py:73\u001b[0m, in \u001b[0;36mget\u001b[1;34m(url, params, **kwargs)\u001b[0m\n\u001b[0;32m 62\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mget\u001b[39m(url, params\u001b[38;5;241m=\u001b[39m\u001b[38;5;28;01mNone\u001b[39;00m, \u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mkwargs):\n\u001b[0;32m 63\u001b[0m \u001b[38;5;250m \u001b[39m\u001b[38;5;124mr\u001b[39m\u001b[38;5;124;03m\"\"\"Sends a GET request.\u001b[39;00m\n\u001b[0;32m 64\u001b[0m \n\u001b[0;32m 65\u001b[0m \u001b[38;5;124;03m :param url: URL for the new :class:`Request` object.\u001b[39;00m\n\u001b[1;32m (...)\u001b[0m\n\u001b[0;32m 70\u001b[0m \u001b[38;5;124;03m :rtype: requests.Response\u001b[39;00m\n\u001b[0;32m 71\u001b[0m \u001b[38;5;124;03m \"\"\"\u001b[39;00m\n\u001b[1;32m---> 73\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m request(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mget\u001b[39m\u001b[38;5;124m\"\u001b[39m, url, params\u001b[38;5;241m=\u001b[39mparams, \u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mkwargs)\n",
|
||||
"File \u001b[1;32md:\\Anaconda3\\Lib\\site-packages\\requests\\api.py:59\u001b[0m, in \u001b[0;36mrequest\u001b[1;34m(method, url, **kwargs)\u001b[0m\n\u001b[0;32m 55\u001b[0m \u001b[38;5;66;03m# By using the 'with' statement we are sure the session is closed, thus we\u001b[39;00m\n\u001b[0;32m 56\u001b[0m \u001b[38;5;66;03m# avoid leaving sockets open which can trigger a ResourceWarning in some\u001b[39;00m\n\u001b[0;32m 57\u001b[0m \u001b[38;5;66;03m# cases, and look like a memory leak in others.\u001b[39;00m\n\u001b[0;32m 58\u001b[0m \u001b[38;5;28;01mwith\u001b[39;00m sessions\u001b[38;5;241m.\u001b[39mSession() \u001b[38;5;28;01mas\u001b[39;00m session:\n\u001b[1;32m---> 59\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m session\u001b[38;5;241m.\u001b[39mrequest(method\u001b[38;5;241m=\u001b[39mmethod, url\u001b[38;5;241m=\u001b[39murl, \u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mkwargs)\n",
|
||||
"File \u001b[1;32md:\\Anaconda3\\Lib\\site-packages\\requests\\sessions.py:589\u001b[0m, in \u001b[0;36mSession.request\u001b[1;34m(self, method, url, params, data, headers, cookies, files, auth, timeout, allow_redirects, proxies, hooks, stream, verify, cert, json)\u001b[0m\n\u001b[0;32m 584\u001b[0m send_kwargs \u001b[38;5;241m=\u001b[39m {\n\u001b[0;32m 585\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mtimeout\u001b[39m\u001b[38;5;124m\"\u001b[39m: timeout,\n\u001b[0;32m 586\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mallow_redirects\u001b[39m\u001b[38;5;124m\"\u001b[39m: allow_redirects,\n\u001b[0;32m 587\u001b[0m }\n\u001b[0;32m 588\u001b[0m send_kwargs\u001b[38;5;241m.\u001b[39mupdate(settings)\n\u001b[1;32m--> 589\u001b[0m resp \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39msend(prep, \u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39msend_kwargs)\n\u001b[0;32m 591\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m resp\n",
|
||||
"File \u001b[1;32md:\\Anaconda3\\Lib\\site-packages\\requests\\sessions.py:703\u001b[0m, in \u001b[0;36mSession.send\u001b[1;34m(self, request, **kwargs)\u001b[0m\n\u001b[0;32m 700\u001b[0m start \u001b[38;5;241m=\u001b[39m preferred_clock()\n\u001b[0;32m 702\u001b[0m \u001b[38;5;66;03m# Send the request\u001b[39;00m\n\u001b[1;32m--> 703\u001b[0m r \u001b[38;5;241m=\u001b[39m adapter\u001b[38;5;241m.\u001b[39msend(request, \u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mkwargs)\n\u001b[0;32m 705\u001b[0m \u001b[38;5;66;03m# Total elapsed time of the request (approximately)\u001b[39;00m\n\u001b[0;32m 706\u001b[0m elapsed \u001b[38;5;241m=\u001b[39m preferred_clock() \u001b[38;5;241m-\u001b[39m start\n",
|
||||
"File \u001b[1;32md:\\Anaconda3\\Lib\\site-packages\\requests\\adapters.py:589\u001b[0m, in \u001b[0;36mHTTPAdapter.send\u001b[1;34m(self, request, stream, timeout, verify, cert, proxies)\u001b[0m\n\u001b[0;32m 586\u001b[0m timeout \u001b[38;5;241m=\u001b[39m TimeoutSauce(connect\u001b[38;5;241m=\u001b[39mtimeout, read\u001b[38;5;241m=\u001b[39mtimeout)\n\u001b[0;32m 588\u001b[0m \u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[1;32m--> 589\u001b[0m resp \u001b[38;5;241m=\u001b[39m conn\u001b[38;5;241m.\u001b[39murlopen(\n\u001b[0;32m 590\u001b[0m method\u001b[38;5;241m=\u001b[39mrequest\u001b[38;5;241m.\u001b[39mmethod,\n\u001b[0;32m 591\u001b[0m url\u001b[38;5;241m=\u001b[39murl,\n\u001b[0;32m 592\u001b[0m body\u001b[38;5;241m=\u001b[39mrequest\u001b[38;5;241m.\u001b[39mbody,\n\u001b[0;32m 593\u001b[0m headers\u001b[38;5;241m=\u001b[39mrequest\u001b[38;5;241m.\u001b[39mheaders,\n\u001b[0;32m 594\u001b[0m redirect\u001b[38;5;241m=\u001b[39m\u001b[38;5;28;01mFalse\u001b[39;00m,\n\u001b[0;32m 595\u001b[0m assert_same_host\u001b[38;5;241m=\u001b[39m\u001b[38;5;28;01mFalse\u001b[39;00m,\n\u001b[0;32m 596\u001b[0m preload_content\u001b[38;5;241m=\u001b[39m\u001b[38;5;28;01mFalse\u001b[39;00m,\n\u001b[0;32m 597\u001b[0m decode_content\u001b[38;5;241m=\u001b[39m\u001b[38;5;28;01mFalse\u001b[39;00m,\n\u001b[0;32m 598\u001b[0m retries\u001b[38;5;241m=\u001b[39m\u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mmax_retries,\n\u001b[0;32m 599\u001b[0m timeout\u001b[38;5;241m=\u001b[39mtimeout,\n\u001b[0;32m 600\u001b[0m chunked\u001b[38;5;241m=\u001b[39mchunked,\n\u001b[0;32m 601\u001b[0m )\n\u001b[0;32m 603\u001b[0m \u001b[38;5;28;01mexcept\u001b[39;00m (ProtocolError, \u001b[38;5;167;01mOSError\u001b[39;00m) \u001b[38;5;28;01mas\u001b[39;00m err:\n\u001b[0;32m 604\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mConnectionError\u001b[39;00m(err, request\u001b[38;5;241m=\u001b[39mrequest)\n",
|
||||
"File \u001b[1;32md:\\Anaconda3\\Lib\\site-packages\\urllib3\\connectionpool.py:787\u001b[0m, in \u001b[0;36mHTTPConnectionPool.urlopen\u001b[1;34m(self, method, url, body, headers, retries, redirect, assert_same_host, timeout, pool_timeout, release_conn, chunked, body_pos, preload_content, decode_content, **response_kw)\u001b[0m\n\u001b[0;32m 784\u001b[0m response_conn \u001b[38;5;241m=\u001b[39m conn \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m release_conn \u001b[38;5;28;01melse\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m\n\u001b[0;32m 786\u001b[0m \u001b[38;5;66;03m# Make the request on the HTTPConnection object\u001b[39;00m\n\u001b[1;32m--> 787\u001b[0m response \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_make_request(\n\u001b[0;32m 788\u001b[0m conn,\n\u001b[0;32m 789\u001b[0m method,\n\u001b[0;32m 790\u001b[0m url,\n\u001b[0;32m 791\u001b[0m timeout\u001b[38;5;241m=\u001b[39mtimeout_obj,\n\u001b[0;32m 792\u001b[0m body\u001b[38;5;241m=\u001b[39mbody,\n\u001b[0;32m 793\u001b[0m headers\u001b[38;5;241m=\u001b[39mheaders,\n\u001b[0;32m 794\u001b[0m chunked\u001b[38;5;241m=\u001b[39mchunked,\n\u001b[0;32m 795\u001b[0m retries\u001b[38;5;241m=\u001b[39mretries,\n\u001b[0;32m 796\u001b[0m response_conn\u001b[38;5;241m=\u001b[39mresponse_conn,\n\u001b[0;32m 797\u001b[0m preload_content\u001b[38;5;241m=\u001b[39mpreload_content,\n\u001b[0;32m 798\u001b[0m decode_content\u001b[38;5;241m=\u001b[39mdecode_content,\n\u001b[0;32m 799\u001b[0m \u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mresponse_kw,\n\u001b[0;32m 800\u001b[0m )\n\u001b[0;32m 802\u001b[0m \u001b[38;5;66;03m# Everything went great!\u001b[39;00m\n\u001b[0;32m 803\u001b[0m clean_exit \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;01mTrue\u001b[39;00m\n",
|
||||
"File \u001b[1;32md:\\Anaconda3\\Lib\\site-packages\\urllib3\\connectionpool.py:493\u001b[0m, in \u001b[0;36mHTTPConnectionPool._make_request\u001b[1;34m(self, conn, method, url, body, headers, retries, timeout, chunked, response_conn, preload_content, decode_content, enforce_content_length)\u001b[0m\n\u001b[0;32m 490\u001b[0m \u001b[38;5;66;03m# conn.request() calls http.client.*.request, not the method in\u001b[39;00m\n\u001b[0;32m 491\u001b[0m \u001b[38;5;66;03m# urllib3.request. It also calls makefile (recv) on the socket.\u001b[39;00m\n\u001b[0;32m 492\u001b[0m \u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[1;32m--> 493\u001b[0m conn\u001b[38;5;241m.\u001b[39mrequest(\n\u001b[0;32m 494\u001b[0m method,\n\u001b[0;32m 495\u001b[0m url,\n\u001b[0;32m 496\u001b[0m body\u001b[38;5;241m=\u001b[39mbody,\n\u001b[0;32m 497\u001b[0m headers\u001b[38;5;241m=\u001b[39mheaders,\n\u001b[0;32m 498\u001b[0m chunked\u001b[38;5;241m=\u001b[39mchunked,\n\u001b[0;32m 499\u001b[0m preload_content\u001b[38;5;241m=\u001b[39mpreload_content,\n\u001b[0;32m 500\u001b[0m decode_content\u001b[38;5;241m=\u001b[39mdecode_content,\n\u001b[0;32m 501\u001b[0m enforce_content_length\u001b[38;5;241m=\u001b[39menforce_content_length,\n\u001b[0;32m 502\u001b[0m )\n\u001b[0;32m 504\u001b[0m \u001b[38;5;66;03m# We are swallowing BrokenPipeError (errno.EPIPE) since the server is\u001b[39;00m\n\u001b[0;32m 505\u001b[0m \u001b[38;5;66;03m# legitimately able to close the connection after sending a valid response.\u001b[39;00m\n\u001b[0;32m 506\u001b[0m \u001b[38;5;66;03m# With this behaviour, the received response is still readable.\u001b[39;00m\n\u001b[0;32m 507\u001b[0m \u001b[38;5;28;01mexcept\u001b[39;00m \u001b[38;5;167;01mBrokenPipeError\u001b[39;00m:\n",
|
||||
"File \u001b[1;32md:\\Anaconda3\\Lib\\site-packages\\urllib3\\connection.py:494\u001b[0m, in \u001b[0;36mHTTPConnection.request\u001b[1;34m(self, method, url, body, headers, chunked, preload_content, decode_content, enforce_content_length)\u001b[0m\n\u001b[0;32m 492\u001b[0m \u001b[38;5;28;01mfor\u001b[39;00m header, value \u001b[38;5;129;01min\u001b[39;00m headers\u001b[38;5;241m.\u001b[39mitems():\n\u001b[0;32m 493\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mputheader(header, value)\n\u001b[1;32m--> 494\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mendheaders()\n\u001b[0;32m 496\u001b[0m \u001b[38;5;66;03m# If we're given a body we start sending that in chunks.\u001b[39;00m\n\u001b[0;32m 497\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m chunks \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m:\n",
|
||||
"File \u001b[1;32md:\\Anaconda3\\Lib\\http\\client.py:1331\u001b[0m, in \u001b[0;36mHTTPConnection.endheaders\u001b[1;34m(self, message_body, encode_chunked)\u001b[0m\n\u001b[0;32m 1329\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[0;32m 1330\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m CannotSendHeader()\n\u001b[1;32m-> 1331\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_send_output(message_body, encode_chunked\u001b[38;5;241m=\u001b[39mencode_chunked)\n",
|
||||
"File \u001b[1;32md:\\Anaconda3\\Lib\\http\\client.py:1091\u001b[0m, in \u001b[0;36mHTTPConnection._send_output\u001b[1;34m(self, message_body, encode_chunked)\u001b[0m\n\u001b[0;32m 1089\u001b[0m msg \u001b[38;5;241m=\u001b[39m \u001b[38;5;124mb\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;130;01m\\r\u001b[39;00m\u001b[38;5;130;01m\\n\u001b[39;00m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;241m.\u001b[39mjoin(\u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_buffer)\n\u001b[0;32m 1090\u001b[0m \u001b[38;5;28;01mdel\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_buffer[:]\n\u001b[1;32m-> 1091\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39msend(msg)\n\u001b[0;32m 1093\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m message_body \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m:\n\u001b[0;32m 1094\u001b[0m \n\u001b[0;32m 1095\u001b[0m \u001b[38;5;66;03m# create a consistent interface to message_body\u001b[39;00m\n\u001b[0;32m 1096\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28mhasattr\u001b[39m(message_body, \u001b[38;5;124m'\u001b[39m\u001b[38;5;124mread\u001b[39m\u001b[38;5;124m'\u001b[39m):\n\u001b[0;32m 1097\u001b[0m \u001b[38;5;66;03m# Let file-like take precedence over byte-like. This\u001b[39;00m\n\u001b[0;32m 1098\u001b[0m \u001b[38;5;66;03m# is needed to allow the current position of mmap'ed\u001b[39;00m\n\u001b[0;32m 1099\u001b[0m \u001b[38;5;66;03m# files to be taken into account.\u001b[39;00m\n",
|
||||
"File \u001b[1;32md:\\Anaconda3\\Lib\\http\\client.py:1035\u001b[0m, in \u001b[0;36mHTTPConnection.send\u001b[1;34m(self, data)\u001b[0m\n\u001b[0;32m 1033\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39msock \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m:\n\u001b[0;32m 1034\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mauto_open:\n\u001b[1;32m-> 1035\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mconnect()\n\u001b[0;32m 1036\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[0;32m 1037\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m NotConnected()\n",
|
||||
"File \u001b[1;32md:\\Anaconda3\\Lib\\site-packages\\urllib3\\connection.py:325\u001b[0m, in \u001b[0;36mHTTPConnection.connect\u001b[1;34m(self)\u001b[0m\n\u001b[0;32m 324\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mconnect\u001b[39m(\u001b[38;5;28mself\u001b[39m) \u001b[38;5;241m-\u001b[39m\u001b[38;5;241m>\u001b[39m \u001b[38;5;28;01mNone\u001b[39;00m:\n\u001b[1;32m--> 325\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39msock \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_new_conn()\n\u001b[0;32m 326\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_tunnel_host:\n\u001b[0;32m 327\u001b[0m \u001b[38;5;66;03m# If we're tunneling it means we're connected to our proxy.\u001b[39;00m\n\u001b[0;32m 328\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_has_connected_to_proxy \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;01mTrue\u001b[39;00m\n",
|
||||
"File \u001b[1;32md:\\Anaconda3\\Lib\\site-packages\\urllib3\\connection.py:198\u001b[0m, in \u001b[0;36mHTTPConnection._new_conn\u001b[1;34m(self)\u001b[0m\n\u001b[0;32m 193\u001b[0m \u001b[38;5;250m\u001b[39m\u001b[38;5;124;03m\"\"\"Establish a socket connection and set nodelay settings on it.\u001b[39;00m\n\u001b[0;32m 194\u001b[0m \n\u001b[0;32m 195\u001b[0m \u001b[38;5;124;03m:return: New socket connection.\u001b[39;00m\n\u001b[0;32m 196\u001b[0m \u001b[38;5;124;03m\"\"\"\u001b[39;00m\n\u001b[0;32m 197\u001b[0m \u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[1;32m--> 198\u001b[0m sock \u001b[38;5;241m=\u001b[39m connection\u001b[38;5;241m.\u001b[39mcreate_connection(\n\u001b[0;32m 199\u001b[0m (\u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_dns_host, \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mport),\n\u001b[0;32m 200\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mtimeout,\n\u001b[0;32m 201\u001b[0m source_address\u001b[38;5;241m=\u001b[39m\u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39msource_address,\n\u001b[0;32m 202\u001b[0m socket_options\u001b[38;5;241m=\u001b[39m\u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39msocket_options,\n\u001b[0;32m 203\u001b[0m )\n\u001b[0;32m 204\u001b[0m \u001b[38;5;28;01mexcept\u001b[39;00m socket\u001b[38;5;241m.\u001b[39mgaierror \u001b[38;5;28;01mas\u001b[39;00m e:\n\u001b[0;32m 205\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m NameResolutionError(\u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mhost, \u001b[38;5;28mself\u001b[39m, e) \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01me\u001b[39;00m\n",
|
||||
"File \u001b[1;32md:\\Anaconda3\\Lib\\site-packages\\urllib3\\util\\connection.py:73\u001b[0m, in \u001b[0;36mcreate_connection\u001b[1;34m(address, timeout, source_address, socket_options)\u001b[0m\n\u001b[0;32m 71\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m source_address:\n\u001b[0;32m 72\u001b[0m sock\u001b[38;5;241m.\u001b[39mbind(source_address)\n\u001b[1;32m---> 73\u001b[0m sock\u001b[38;5;241m.\u001b[39mconnect(sa)\n\u001b[0;32m 74\u001b[0m \u001b[38;5;66;03m# Break explicitly a reference cycle\u001b[39;00m\n\u001b[0;32m 75\u001b[0m err \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;01mNone\u001b[39;00m\n",
|
||||
"\u001b[1;31mKeyboardInterrupt\u001b[0m: "
|
||||
]
|
||||
},
|
||||
{
|
||||
"ename": "",
|
||||
"evalue": "",
|
||||
"output_type": "error",
|
||||
"traceback": [
|
||||
"\u001b[1;31m在当前单元格或上一个单元格中执行代码时 Kernel 崩溃。\n",
|
||||
"\u001b[1;31m请查看单元格中的代码,以确定故障的可能原因。\n",
|
||||
"\u001b[1;31m单击<a href='https://aka.ms/vscodeJupyterKernelCrash'>此处</a>了解详细信息。\n",
|
||||
"\u001b[1;31m有关更多详细信息,请查看 Jupyter <a href='command:jupyter.viewOutput'>log</a>。"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"for stu in studentInfos:\n",
|
||||
" userName = stu['userName']\n",
|
||||
" stuNo= f\"{stu['stuNo']}a\"\n",
|
||||
" res = get(f\"{ip}/oauth/token?username={userName}&password={stuNo}&client_id=client&grant_type=password&client_secret=123456\").json()\n",
|
||||
" if res.get(\"access_token\",False) and stu[\"type\"]==5:\n",
|
||||
" count = 2\n",
|
||||
" if stu[\"wxPhone\"]:\n",
|
||||
" count-=1\n",
|
||||
" if stu[\"wxPhones\"]:\n",
|
||||
" count-=1\n",
|
||||
" \n",
|
||||
" print(f\"{stu['stuName']} 未改密码,{count}个联系方式未绑定\")\n",
|
||||
" # getSportInfo(stu[\"seralNo\"])"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"id": "772377e5",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": []
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"kernelspec": {
|
||||
"display_name": "base",
|
||||
"language": "python",
|
||||
"name": "python3"
|
||||
},
|
||||
"language_info": {
|
||||
"codemirror_mode": {
|
||||
"name": "ipython",
|
||||
"version": 3
|
||||
},
|
||||
"file_extension": ".py",
|
||||
"mimetype": "text/x-python",
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.12.4"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 5
|
||||
}
|
||||
Reference in New Issue
Block a user