first commit
This commit is contained in:
@@ -0,0 +1,360 @@
|
||||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 1,
|
||||
"id": "eb6a8154",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"import pandas as pd\n",
|
||||
"df = pd.read_excel('./学生信息_最新.xlsx',dtype='str')"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 5,
|
||||
"id": "78f0cdaa",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"'<html>\\r\\n<head><title>404 Not Found</title></head>\\r\\n<body bgcolor=\"white\">\\r\\n<center><h1>404 Not Found</h1></center>\\r\\n<hr><center>nginx/1.4.0</center>\\r\\n</body>\\r\\n</html>\\r\\n'"
|
||||
]
|
||||
},
|
||||
"execution_count": 5,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"get(url=f\"http://band.hxzhxy.cn/oauth/token?username=zhongwei&password=123456a&client_id=client&grant_type=password&client_secret=123456\").text"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 1,
|
||||
"id": "d34b4562",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"from requests import get,post\n",
|
||||
"import time\n",
|
||||
"ip = \"http://band.hxzhxy.cn\"\n",
|
||||
"param = {\n",
|
||||
" \"username\": \"tangchao\",\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": 3,
|
||||
"id": "80c5ff5c",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stderr",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"C:\\Users\\Administrator\\AppData\\Local\\Temp\\ipykernel_11244\\3332289157.py:1: DeprecationWarning: DataFrameGroupBy.apply operated on the grouping columns. This behavior is deprecated, and in a future version of pandas the grouping columns will be excluded from the operation. Either pass `include_groups=False` to exclude the groupings or explicitly select the grouping columns after groupby to silence this warning.\n",
|
||||
" a = df.groupby(\"教室\").apply(lambda x:x[\"手环号\"].tolist())\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"a = df.groupby(\"教室\").apply(lambda x:x[\"手环号\"].tolist())"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"id": "bd8942ac",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": []
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 4,
|
||||
"id": "6756c409",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"doors = get(f\"https://band.hxzhxy.cn/door/lock/listLockPage?teamId=119&pageSize=60&pageNumber=0&value=&areaId=&tierId=®ionId=&bindType=&lockName=&type=2&mainTypeId=&sizeType=&lockType=&access_token={token}\").json()"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 5,
|
||||
"id": "11c5f395",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"doors_map ={}\n",
|
||||
"for item in doors[\"data\"][\"content\"]:\n",
|
||||
" doors_map[item[\"lockName\"]] = item[\"lockNo\"]"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 6,
|
||||
"id": "ac4e8886",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"教室\n",
|
||||
"2210 [0022796140, 0022753212, 0022796172, 310863721...\n",
|
||||
"2211 [3108594513, 3108622273, 3108583137, 002303998...\n",
|
||||
"2212 [3108445809, 3108464161, 3108415601, 310846636...\n",
|
||||
"2213 [0022820892, 3108624769, 3108605505, 310846235...\n",
|
||||
"2214 [3108599409, 3107632929, 3108571601, 002272249...\n",
|
||||
"2311 [3108598753, 3108438913, 3108358785, 310839236...\n",
|
||||
"2312 [3108631313, 0022702140, 3108584241, 002283212...\n",
|
||||
"2313 [3108562849, 0022679980, 3108437249, 310843908...\n",
|
||||
"2314 [3108415473, 3108462385, 0022752972, 310862931...\n",
|
||||
"2510 [0022822732, 3108606273, 3108390481, 002279577...\n",
|
||||
"2511 [3108388321, 0022704076, 3108582545, 002270244...\n",
|
||||
"2512 [3108606081, 3108614401, 3108600385, 310844576...\n",
|
||||
"2513 [3108440913, 3108683713, 3108588817, 310868209...\n",
|
||||
"2514 [3108361393, 3108600401, 3108597553, 310860504...\n",
|
||||
"dtype: object"
|
||||
]
|
||||
},
|
||||
"execution_count": 6,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"a"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 7,
|
||||
"id": "9c65d092",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"for key,value in a.items():\n",
|
||||
" lockNo = doors_map.get(f'{key}前门',None)\n",
|
||||
" addUserBand = \",\".join(value)\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 2,
|
||||
"id": "4cae8da6",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"result =post(\"https://band.hxzhxy.cn/door/accredit/sendNews\",json={\"startTime\":\"25083115\",\"endTime\":\"28052815\",\"adminType\":\"55\",\"type\":\"01\",\"time\":[1756625633772,1843112033772],\"accountIp\":\"183.220.92.52\",\"accountName\":\"183.220.92.52\",\"lockNo\":\"181681774702\",\"serialNo\":\"868002345684294\",\"addAdminBand\":\"\",\"addUserBand\":\"3108624305\",\"removeBand\":\"\",\"doorAccreditIds\":\"\"},headers=header).text"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"id": "aef76278",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"from datetime import datetime,timedelta\n",
|
||||
"start = datetime.now().strftime(\"%y%m%d%H\")\n",
|
||||
"end = (datetime.now()+ timedelta(days=365)).strftime(\"%y%m%d%H\")"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"id": "ed36257e",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"('25091916', '26091916')"
|
||||
]
|
||||
},
|
||||
"execution_count": 10,
|
||||
"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": [
|
||||
"start,end"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"id": "673efe31",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"下发2512前门\n",
|
||||
"参数lockNo:181681774855,serialNo:868002345684074,addUserBand:3108606081,3108614401,3108600385,3108445761,0022754844,3108629505,3108601713,3108590993,0022722508,3108586817,3108354753,3108586769,3108386177,3108359649,3108584129,3108356609,0022830300,3108637281,3108637185,3108605073,3108605345,3108632769,0022796108,3108595409,3108562881,3108614321,3108388129,3108603841,0022821084,3108359713,3108358529,3108460625,0023038412,3108466545,3108681873,3108396257,3108652497\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\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 key,value in a.items():\n",
|
||||
"# lockNo = doors_map.get(f'{key}前门',None)\n",
|
||||
"# addUserBand = \",\".join(value)\n",
|
||||
"for key,value in a.items():\n",
|
||||
" lockNo = doors_map.get(f'{key}前门',None)\n",
|
||||
" addUserBand = \",\".join(value)\n",
|
||||
" if key!='2512':continue\n",
|
||||
" for item in doors[\"data\"][\"content\"]:\n",
|
||||
" if item[\"lockName\"] == f'{key}前门':\n",
|
||||
" print( f'下发{key}前门')\n",
|
||||
" print(f\"参数lockNo:{lockNo},serialNo:{item['serialNo']},addUserBand:{addUserBand}\")\n",
|
||||
" result =post(\"https://band.hxzhxy.cn/door/accredit/sendNews\",json={\"startTime\":\"25083115\",\"endTime\":\"28052815\",\"adminType\":\"55\",\"type\":\"01\",\"time\":[1756625633772,1843112033772],\"accountIp\":\"183.220.92.52\",\"accountName\":\"183.220.92.52\",\"lockNo\":lockNo,\"serialNo\":item[\"serialNo\"],\"addAdminBand\":\"\",\"addUserBand\":addUserBand,\"removeBand\":\"\",\"doorAccreditIds\":\"\"},headers=header).text\n",
|
||||
" print(result)\n",
|
||||
" # print(a)\n",
|
||||
" time.sleep(10)\n",
|
||||
" break\n",
|
||||
" "
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 12,
|
||||
"id": "c4e96b85",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"import tqdm"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 31,
|
||||
"id": "96da8a5d",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stderr",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"100%|██████████| 52/52 [00:07<00:00, 7.22it/s]\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"data = get(f\"https://band.hxzhxy.cn/door/lock/listLockPage?teamId=119&pageSize=60&pageNumber=0&value=&areaId=&tierId=®ionId=&bindType=&lockName=&type=2&mainTypeId=&sizeType=&lockType=&access_token={token}\").json()\n",
|
||||
"with tqdm.tqdm(total=len(data[\"data\"][\"content\"])) as pbar:\n",
|
||||
" for item in data[\"data\"][\"content\"]:\n",
|
||||
" if item[\"password\"] == \"12345687\" or item[\"password\"]==None: \n",
|
||||
" pbar.update(1)\n",
|
||||
" continue\n",
|
||||
" post(\"https://band.hxzhxy.cn/door/password/send\",json={\"lockNos\":item[\"lockNo\"],\"serialNos\":item[\"serialNo\"],\"password\":\"12345687\",\"type\":\"04\",\"typeSend\":\"0\",\"accountIp\":\"183.220.91.181\",\"accountName\":\"183.220.91.181\",\"account\":\"5789\"},headers=header)\n",
|
||||
" time.sleep(7)\n",
|
||||
" pbar.update(1)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 33,
|
||||
"id": "ee45017c",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"{'bandUserCount': 0, 'lockNo': '181681774855', 'teamId': 119, 'electric': 100, 'tierName': '5', 'doorName': '2512前门', 'ID': 723, 'lockType': 2, 'remark': None, 'mainType': '教室', 'type': '', 'password': '88888888', 'bandAdminCount': 4, 'remask': None, 'alias': '教学楼3-2门锁网关', 'createTime': 1755314698000, 'dongId': 28, 'genre': None, 'gateType': 1, 'dongName': '1栋', 'lockName': '2512前门', 'roomName': '2512', 'image': None, 'sizeType': 1, 'isPassword': 1, 'regionName': '无', 'areaId': 20, 'updateTime': None, 'version': None, 'serialNo': '868002345684074', 'opsTime': None, 'teamName': '2512', 'tierId': 64, 'doorId': 747, 'areaName': '教学楼', 'batteryType': None}\n",
|
||||
"88888888\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"data = get(f\"https://band.hxzhxy.cn/door/lock/listLockPage?teamId=119&pageSize=60&pageNumber=0&value=&areaId=&tierId=®ionId=&bindType=&lockName=&type=2&mainTypeId=&sizeType=&lockType=&access_token={token}\").json()\n",
|
||||
"for item in data[\"data\"][\"content\"]:\n",
|
||||
" if item[\"password\"] != \"12345687\" and item[\"password\"]!=None:\n",
|
||||
" print(item)\n",
|
||||
" print(item['password'])"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 9,
|
||||
"id": "cc3c500c",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"32"
|
||||
]
|
||||
},
|
||||
"execution_count": 9,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"len(\"Xpaotongshutongwenzhongxue971001\")"
|
||||
]
|
||||
}
|
||||
],
|
||||
"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,314 @@
|
||||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 1,
|
||||
"id": "d34b4562",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"from requests import get,post\n",
|
||||
"import time\n",
|
||||
"ip = \"http://band.hxzhxy.cn\"\n",
|
||||
"param = {\n",
|
||||
" \"username\": \"tangchao\",\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": null,
|
||||
"id": "03513226",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"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": [
|
||||
"data = get(f\"https://band.hxzhxy.cn/door/lock/listLockPage?teamId=119&pageSize=60&pageNumber=0&value=&areaId=&tierId=®ionId=&bindType=&lockName=&type=2&mainTypeId=&sizeType=&lockType=&access_token={token}\").json()"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 3,
|
||||
"id": "4108fb9a",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"import time"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 4,
|
||||
"id": "266fc913",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"serialNos=['1619991908']"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 5,
|
||||
"id": "673efe31",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"for item in data[\"data\"][\"content\"]:\n",
|
||||
" addAdminBand =\",\".join(serialNos)\n",
|
||||
" a =post(\"https://band.hxzhxy.cn/door/accredit/sendNews\",json={\n",
|
||||
" \"startTime\":\"25082114\",\"endTime\":\"35051814\",\"adminType\":\"55\",\"type\":\"01\",\"time\":[1755756984314,2071380076000],\"accountIp\":\"183.220.92.213\",\"accountName\":\"183.220.92.213\",\"lockNo\":item[\"lockNo\"],\"serialNo\":item[\"serialNo\"],\"addAdminBand\":\"\",\"addUserBand\":addAdminBand,\"removeBand\":\"\",\"doorAccreditIds\":\"\"\n",
|
||||
" },headers=header).text\n",
|
||||
" print(a)\n",
|
||||
" time.sleep(1)\n",
|
||||
" "
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"id": "c4e96b85",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"import tqdm"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"id": "96da8a5d",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"data = get(f\"https://band.hxzhxy.cn/door/lock/listLockPage?teamId=119&pageSize=60&pageNumber=0&value=&areaId=&tierId=®ionId=&bindType=&lockName=&type=2&mainTypeId=&sizeType=&lockType=&access_token={token}\").json()\n",
|
||||
"with tqdm.tqdm(total=len(data[\"data\"][\"content\"])) as pbar:\n",
|
||||
" for item in data[\"data\"][\"content\"]:\n",
|
||||
" if item[\"password\"] == \"12345687\" or item[\"password\"]==None: \n",
|
||||
" pbar.update(1)\n",
|
||||
" continue\n",
|
||||
" post(\"https://band.hxzhxy.cn/door/password/send\",json={\"lockNos\":item[\"lockNo\"],\"serialNos\":item[\"serialNo\"],\"password\":\"12345687\",\"type\":\"04\",\"typeSend\":\"0\",\"accountIp\":\"183.220.91.181\",\"accountName\":\"183.220.91.181\",\"account\":\"5789\"},headers=header)\n",
|
||||
" time.sleep(7)\n",
|
||||
" pbar.update(1)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"id": "ee45017c",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"data = get(f\"https://band.hxzhxy.cn/door/lock/listLockPage?teamId=119&pageSize=60&pageNumber=0&value=&areaId=&tierId=®ionId=&bindType=&lockName=&type=2&mainTypeId=&sizeType=&lockType=&access_token={token}\").json()\n",
|
||||
"for item in data[\"data\"][\"content\"]:\n",
|
||||
" if item[\"password\"] != \"12345687\" and item[\"password\"]!=None:\n",
|
||||
" print(item)\n",
|
||||
" print(item['password'])"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"id": "cc3c500c",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"len(\"Xpaotongshutongwenzhongxue971001\")"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 37,
|
||||
"id": "e1a6df45",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"['4007516707',\n",
|
||||
" '4009525491',\n",
|
||||
" '4004683395',\n",
|
||||
" '4008811955',\n",
|
||||
" '4008924883',\n",
|
||||
" '4009224243',\n",
|
||||
" '4009213507',\n",
|
||||
" '4009187555',\n",
|
||||
" '4007743635',\n",
|
||||
" '4009523651',\n",
|
||||
" '4008270787',\n",
|
||||
" '4009482275',\n",
|
||||
" '0276930835',\n",
|
||||
" '4009509123',\n",
|
||||
" '4007526915',\n",
|
||||
" '4007516643',\n",
|
||||
" '4008464659',\n",
|
||||
" '4009443907',\n",
|
||||
" '4009203219',\n",
|
||||
" '4009209379',\n",
|
||||
" '3478812113',\n",
|
||||
" '3470473985']"
|
||||
]
|
||||
},
|
||||
"execution_count": 37,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"serialNos"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 43,
|
||||
"id": "d35c7e00",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"0\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"#权限提取\n",
|
||||
"count = 0\n",
|
||||
"for item in data[\"data\"][\"content\"]:\n",
|
||||
" teacher = get(f\"https://band.hxzhxy.cn/door/admin/selectAllTeacherAndSerialNew?teamId=119&lockNo={item['lockNo']}&access_token=2ca5ff6c-24a0-4231-98e2-fec9e38c5a38\").json()[\"data\"][\"userTea\"]\n",
|
||||
" flag = True\n",
|
||||
" for i in teacher:\n",
|
||||
" if '物业' in i[\"teaName\"]:\n",
|
||||
" flag = False\n",
|
||||
" break\n",
|
||||
" if flag:\n",
|
||||
" print(item[\"lockName\"])\n",
|
||||
" count+=1\n",
|
||||
" addAdminBand =\",\".join(serialNos)\n",
|
||||
" a =post(\"https://band.hxzhxy.cn/door/accredit/sendNews\",json={\n",
|
||||
" \"startTime\":\"25082114\",\"endTime\":\"35051814\",\"adminType\":\"55\",\"type\":\"01\",\"time\":[1755756984314,2071380076000],\"accountIp\":\"183.220.92.213\",\"accountName\":\"183.220.92.213\",\"lockNo\":item[\"lockNo\"],\"serialNo\":item[\"serialNo\"],\"addAdminBand\":\"\",\"addUserBand\":addAdminBand,\"removeBand\":\"\",\"doorAccreditIds\":\"\"\n",
|
||||
" },headers=header).text\n",
|
||||
" time.sleep(10)\n",
|
||||
" \n",
|
||||
"print(count)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"id": "263663b3",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": []
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"id": "978802c0",
|
||||
"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
|
||||
}
|
||||
@@ -0,0 +1,331 @@
|
||||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 25,
|
||||
"id": "d99d999d",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"import pandas as pd"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 27,
|
||||
"id": "955684bc",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"df = pd.read_excel(\"./学生信息.xls\", usecols=['学号', '姓名', '性别', '年级','班级'])"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 28,
|
||||
"id": "7a49db1c",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"class_count = df.groupby(['年级', '班级']).size().reset_index(name='人数')"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 29,
|
||||
"id": "3e00f787",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/html": [
|
||||
"<div>\n",
|
||||
"<style scoped>\n",
|
||||
" .dataframe tbody tr th:only-of-type {\n",
|
||||
" vertical-align: middle;\n",
|
||||
" }\n",
|
||||
"\n",
|
||||
" .dataframe tbody tr th {\n",
|
||||
" vertical-align: top;\n",
|
||||
" }\n",
|
||||
"\n",
|
||||
" .dataframe thead th {\n",
|
||||
" text-align: right;\n",
|
||||
" }\n",
|
||||
"</style>\n",
|
||||
"<table border=\"1\" class=\"dataframe\">\n",
|
||||
" <thead>\n",
|
||||
" <tr style=\"text-align: right;\">\n",
|
||||
" <th></th>\n",
|
||||
" <th>年级</th>\n",
|
||||
" <th>班级</th>\n",
|
||||
" <th>人数</th>\n",
|
||||
" </tr>\n",
|
||||
" </thead>\n",
|
||||
" <tbody>\n",
|
||||
" <tr>\n",
|
||||
" <th>0</th>\n",
|
||||
" <td>26学部</td>\n",
|
||||
" <td>1班</td>\n",
|
||||
" <td>42</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>1</th>\n",
|
||||
" <td>26学部</td>\n",
|
||||
" <td>2班</td>\n",
|
||||
" <td>41</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>2</th>\n",
|
||||
" <td>26学部</td>\n",
|
||||
" <td>3班</td>\n",
|
||||
" <td>38</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>3</th>\n",
|
||||
" <td>26学部</td>\n",
|
||||
" <td>4班</td>\n",
|
||||
" <td>40</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>4</th>\n",
|
||||
" <td>26学部</td>\n",
|
||||
" <td>5班</td>\n",
|
||||
" <td>39</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>5</th>\n",
|
||||
" <td>27学部</td>\n",
|
||||
" <td>1班</td>\n",
|
||||
" <td>48</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>6</th>\n",
|
||||
" <td>27学部</td>\n",
|
||||
" <td>2班</td>\n",
|
||||
" <td>47</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>7</th>\n",
|
||||
" <td>27学部</td>\n",
|
||||
" <td>3班</td>\n",
|
||||
" <td>46</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>8</th>\n",
|
||||
" <td>27学部</td>\n",
|
||||
" <td>4班</td>\n",
|
||||
" <td>48</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>9</th>\n",
|
||||
" <td>27学部</td>\n",
|
||||
" <td>5班</td>\n",
|
||||
" <td>48</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>10</th>\n",
|
||||
" <td>28学部</td>\n",
|
||||
" <td>1班</td>\n",
|
||||
" <td>49</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>11</th>\n",
|
||||
" <td>28学部</td>\n",
|
||||
" <td>2班</td>\n",
|
||||
" <td>49</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>12</th>\n",
|
||||
" <td>28学部</td>\n",
|
||||
" <td>3班</td>\n",
|
||||
" <td>49</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>13</th>\n",
|
||||
" <td>28学部</td>\n",
|
||||
" <td>4班</td>\n",
|
||||
" <td>49</td>\n",
|
||||
" </tr>\n",
|
||||
" </tbody>\n",
|
||||
"</table>\n",
|
||||
"</div>"
|
||||
],
|
||||
"text/plain": [
|
||||
" 年级 班级 人数\n",
|
||||
"0 26学部 1班 42\n",
|
||||
"1 26学部 2班 41\n",
|
||||
"2 26学部 3班 38\n",
|
||||
"3 26学部 4班 40\n",
|
||||
"4 26学部 5班 39\n",
|
||||
"5 27学部 1班 48\n",
|
||||
"6 27学部 2班 47\n",
|
||||
"7 27学部 3班 46\n",
|
||||
"8 27学部 4班 48\n",
|
||||
"9 27学部 5班 48\n",
|
||||
"10 28学部 1班 49\n",
|
||||
"11 28学部 2班 49\n",
|
||||
"12 28学部 3班 49\n",
|
||||
"13 28学部 4班 49"
|
||||
]
|
||||
},
|
||||
"execution_count": 29,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"class_count"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"id": "bc5324c0",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": []
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 13,
|
||||
"id": "6a622610",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"df = pd.read_excel(\"./学生信息.xls\", usecols=['学号', '姓名', '性别', '年级'])\n",
|
||||
"row_strings = set()\n",
|
||||
"for _, row in df.iterrows():\n",
|
||||
" row_str = f\"{row['学号']}{row['姓名']}{row['性别']}{row['年级']}\"\n",
|
||||
" row_strings.add(row_str)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 14,
|
||||
"id": "c2b0ab79",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"(633, 4)"
|
||||
]
|
||||
},
|
||||
"execution_count": 14,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"df.shape"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 15,
|
||||
"id": "e5f90213",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"633"
|
||||
]
|
||||
},
|
||||
"execution_count": 15,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"len(row_strings)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 21,
|
||||
"id": "0ec9fe0a",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"df1 = pd.read_excel(\"./学生信息2.xls\", usecols=['学号', '姓名', '性别', '年级'])\n",
|
||||
"row_strings1 = set()\n",
|
||||
"for _, row in df.iterrows():\n",
|
||||
" row_str = f\"{row['学号']}{row['姓名']}{row['性别']}{row['年级']}\"\n",
|
||||
" row_strings1.add(row_str)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 22,
|
||||
"id": "75d2483a",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"'260434于铭达男26学部'"
|
||||
]
|
||||
},
|
||||
"execution_count": 22,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"row_strings1.pop()"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 24,
|
||||
"id": "e5180f79",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"{'260434于铭达男26学部'}"
|
||||
]
|
||||
},
|
||||
"execution_count": 24,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"row_strings - row_strings1 "
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"id": "e87426b4",
|
||||
"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
|
||||
}
|
||||
+1030
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,58 @@
|
||||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 1,
|
||||
"id": "f7558ad5",
|
||||
"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": null,
|
||||
"id": "355a8be9",
|
||||
"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
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 1,
|
||||
"id": "87b031d3",
|
||||
"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": 4,
|
||||
"id": "e8d05784",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"for i in range(1,5):\n",
|
||||
" post(f\"https://band.hxzhxy.cn/uc/class/add?access_token={token}\",json={\"gradeId\":128,\"teamId\":119,\"className\":f\"{i}班\",\"enabled\":True})"
|
||||
]
|
||||
}
|
||||
],
|
||||
"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,402 @@
|
||||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 1,
|
||||
"id": "8722d8c1",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"from requests import get,post\n",
|
||||
"import time\n",
|
||||
"ip = \"http://band.hxzhxy.cn\"\n",
|
||||
"param = {\n",
|
||||
" \"username\": \"tangchao\",\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": 3,
|
||||
"id": "0a5daac0",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"with open(\"老师卡号.txt\",\"r\") as f:\n",
|
||||
" data = f.readlines()"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 6,
|
||||
"id": "4fe7cc35",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"data = [i.strip() for i in data]"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 7,
|
||||
"id": "e3abd961",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"data = set(data)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 8,
|
||||
"id": "3671ee4c",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"{'3469514193',\n",
|
||||
" '3469519393',\n",
|
||||
" '3469552177',\n",
|
||||
" '3469581313',\n",
|
||||
" '3469596961',\n",
|
||||
" '3469609649',\n",
|
||||
" '3469612369',\n",
|
||||
" '3469621121',\n",
|
||||
" '3469623857',\n",
|
||||
" '3469629441',\n",
|
||||
" '3469643777',\n",
|
||||
" '3469682817',\n",
|
||||
" '3469702017',\n",
|
||||
" '3469703377',\n",
|
||||
" '3469704033',\n",
|
||||
" '3469706961',\n",
|
||||
" '3469718081',\n",
|
||||
" '3469718929',\n",
|
||||
" '3469734897',\n",
|
||||
" '3469746033',\n",
|
||||
" '3469747265',\n",
|
||||
" '3469755041',\n",
|
||||
" '3469787969',\n",
|
||||
" '3469805089',\n",
|
||||
" '3469814913',\n",
|
||||
" '3469825521',\n",
|
||||
" '3469832865',\n",
|
||||
" '3469842913',\n",
|
||||
" '3469864113',\n",
|
||||
" '3469892865',\n",
|
||||
" '3469900369',\n",
|
||||
" '3469902913',\n",
|
||||
" '3469903873',\n",
|
||||
" '3469920465',\n",
|
||||
" '3469921185',\n",
|
||||
" '3469921281',\n",
|
||||
" '3469921969',\n",
|
||||
" '3469924737',\n",
|
||||
" '3469935969',\n",
|
||||
" '3469937233',\n",
|
||||
" '3469948529',\n",
|
||||
" '3469977073',\n",
|
||||
" '3469979137',\n",
|
||||
" '3470112929',\n",
|
||||
" '3470131089',\n",
|
||||
" '3470131617',\n",
|
||||
" '3470146785',\n",
|
||||
" '3470161617',\n",
|
||||
" '3470201473',\n",
|
||||
" '3470232945',\n",
|
||||
" '3470249217',\n",
|
||||
" '3470254721',\n",
|
||||
" '3470256161',\n",
|
||||
" '3470260225',\n",
|
||||
" '3470267665',\n",
|
||||
" '3470271137',\n",
|
||||
" '3470273073',\n",
|
||||
" '3470274017',\n",
|
||||
" '3470281505',\n",
|
||||
" '3470290369',\n",
|
||||
" '3470295313',\n",
|
||||
" '3470306737',\n",
|
||||
" '3470321169',\n",
|
||||
" '3470326177',\n",
|
||||
" '3470367985',\n",
|
||||
" '3470398209',\n",
|
||||
" '3470413809',\n",
|
||||
" '3470416705',\n",
|
||||
" '3470427441',\n",
|
||||
" '3470436417',\n",
|
||||
" '3470455105',\n",
|
||||
" '3470456161',\n",
|
||||
" '3470467185',\n",
|
||||
" '3478099521',\n",
|
||||
" '3478109089',\n",
|
||||
" '3478114145',\n",
|
||||
" '3478118337',\n",
|
||||
" '3478122689',\n",
|
||||
" '3478127985',\n",
|
||||
" '3478134321',\n",
|
||||
" '3478138625',\n",
|
||||
" '3478142449',\n",
|
||||
" '3478149377',\n",
|
||||
" '3478189425',\n",
|
||||
" '3478219489',\n",
|
||||
" '3478222433',\n",
|
||||
" '3478239377',\n",
|
||||
" '3478275697',\n",
|
||||
" '3478282593',\n",
|
||||
" '3478360833',\n",
|
||||
" '3478373857',\n",
|
||||
" '3478374961',\n",
|
||||
" '3478376993',\n",
|
||||
" '3478381361',\n",
|
||||
" '3478767249',\n",
|
||||
" '3478768177',\n",
|
||||
" '3478784033',\n",
|
||||
" '3478799537',\n",
|
||||
" '3478822609',\n",
|
||||
" '3478824289',\n",
|
||||
" '3478826705',\n",
|
||||
" '3478849873',\n",
|
||||
" '3478859505',\n",
|
||||
" '3478868353',\n",
|
||||
" '3478878849',\n",
|
||||
" '3478883393',\n",
|
||||
" '3478885889',\n",
|
||||
" '3478891265',\n",
|
||||
" '3478891489',\n",
|
||||
" '3478899025',\n",
|
||||
" '3478905201',\n",
|
||||
" '3478905425',\n",
|
||||
" '3478935969',\n",
|
||||
" '3478937745',\n",
|
||||
" '3479120625',\n",
|
||||
" '3479129665',\n",
|
||||
" '3479150577',\n",
|
||||
" '3479159185',\n",
|
||||
" '3479177937',\n",
|
||||
" '3479178209',\n",
|
||||
" '3479237665',\n",
|
||||
" '3479239713',\n",
|
||||
" '3479262673',\n",
|
||||
" '3479274577',\n",
|
||||
" '3479275665',\n",
|
||||
" '3479276641',\n",
|
||||
" '3479279361',\n",
|
||||
" '3479300913',\n",
|
||||
" '3479301345',\n",
|
||||
" '3479309281',\n",
|
||||
" '3479309905',\n",
|
||||
" '3479313249',\n",
|
||||
" '3479346785',\n",
|
||||
" '3479357393',\n",
|
||||
" '3479369777',\n",
|
||||
" '3479384513'}"
|
||||
]
|
||||
},
|
||||
"execution_count": 8,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"data"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 9,
|
||||
"id": "ff4119d4",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n",
|
||||
"{\"success\":true,\"msg\":\"操作成功\",\"code\":0,\"data\":null}\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"for serialNo in data:\n",
|
||||
" tem = post(f\"https://band.hxzhxy.cn/net-manager/band/add?access_token=b4f3d20c-af97-4c2b-8964-ed5afc7d0ab6\",json= {\"serialNo\":serialNo,\"teamId\":119,\"version\":None,\"type\":\"2\",\"mac\":None,\"schoolId\":None}\n",
|
||||
" ).text\n",
|
||||
" print(tem)\n",
|
||||
" "
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"id": "e91931a9",
|
||||
"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
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user