20240828
This commit is contained in:
1 parent
11a1e51802
commit
724bf28fbf
12 files changed
+708
-446
No files matched your search
+124
-139
@@ -10,16 +10,9 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 50,
|
||||
"execution_count": null,
|
||||
"id": "360f0a97-d73d-43f3-9f7a-0f9582103c82",
|
||||
"metadata": {
|
||||
"execution": {
|
||||
"iopub.execute_input": "2024-07-12T02:10:05.405006Z",
|
||||
"iopub.status.busy": "2024-07-12T02:10:05.404238Z",
|
||||
"iopub.status.idle": "2024-07-12T02:10:05.421154Z",
|
||||
"shell.execute_reply": "2024-07-12T02:10:05.420149Z",
|
||||
"shell.execute_reply.started": "2024-07-12T02:10:05.404936Z"
|
||||
},
|
||||
"tags": []
|
||||
},
|
||||
"outputs": [],
|
||||
@@ -30,8 +23,8 @@
|
||||
"mydb = myclient[\"baogao\"]\n",
|
||||
"mycol = mydb[\"place\"]\n",
|
||||
"\n",
|
||||
"place_id = 496534\n",
|
||||
"place_code = \"12\"\n",
|
||||
"place_id = 698465\n",
|
||||
"place_code = \"06\"\n",
|
||||
"dw_name = \"天宫院社区\"\n",
|
||||
"dw_jc = \"天宫院社区\"\n",
|
||||
"myquery = { \"id\": place_id }\n",
|
||||
@@ -53,15 +46,15 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 52,
|
||||
"execution_count": 11,
|
||||
"id": "6ce2cbc7-435a-461c-bdb8-abd9a6962fbc",
|
||||
"metadata": {
|
||||
"execution": {
|
||||
"iopub.execute_input": "2024-07-12T02:14:38.695650Z",
|
||||
"iopub.status.busy": "2024-07-12T02:14:38.694885Z",
|
||||
"iopub.status.idle": "2024-07-12T02:14:38.722206Z",
|
||||
"shell.execute_reply": "2024-07-12T02:14:38.721109Z",
|
||||
"shell.execute_reply.started": "2024-07-12T02:14:38.695579Z"
|
||||
"iopub.execute_input": "2024-08-11T11:24:39.665184Z",
|
||||
"iopub.status.busy": "2024-08-11T11:24:39.664256Z",
|
||||
"iopub.status.idle": "2024-08-11T11:24:39.691000Z",
|
||||
"shell.execute_reply": "2024-08-11T11:24:39.690127Z",
|
||||
"shell.execute_reply.started": "2024-08-11T11:24:39.665085Z"
|
||||
}
|
||||
},
|
||||
"outputs": [
|
||||
@@ -86,10 +79,10 @@
|
||||
"myclient = pymongo.MongoClient('mongodb://localhost:27017/')\n",
|
||||
"mydb = myclient[\"baogao\"]\n",
|
||||
"\n",
|
||||
"place_id = 496534\n",
|
||||
"place_code = \"12\"\n",
|
||||
"dw_name = \"天宫院社区\"\n",
|
||||
"dw_jc = \"天宫院社区\"\n",
|
||||
"place_id = 698465\n",
|
||||
"place_code = \"06\"\n",
|
||||
"dw_name = \"淄博积家村\"\n",
|
||||
"dw_jc = \"淄博积家村\"\n",
|
||||
"fi_path = '/home/songyi/python/mycrm/flask/pdf/files'\n",
|
||||
"fls = glob.glob(f'{fi_path}/{str(place_id)}/*.pdf')\n",
|
||||
"\n",
|
||||
@@ -107,7 +100,7 @@
|
||||
"\n",
|
||||
"i = 0\n",
|
||||
"while i < len(fls):\n",
|
||||
" code = random.sample(code_list,3) #随机取4位数\n",
|
||||
" code = random.sample(code_list,3) #随机取3位数\n",
|
||||
" code_num = ''.join(code) \n",
|
||||
" if place_code+code_num not in list1 and place_code+code_num not in list2:\n",
|
||||
" list1.append(place_code+code_num)\n",
|
||||
@@ -120,7 +113,7 @@
|
||||
" #fi_name =Path(fn).stem\n",
|
||||
" code = int(fi_name)\n",
|
||||
" dxm = list1[i]\n",
|
||||
" dict2 = {'place_id':place_id,'code':dxm,'fn':Path(fn).name,'rq':'20240622'}\n",
|
||||
" dict2 = {'place_id':place_id,'code':dxm,'fn':Path(fn).name,'rq':'20240811'}\n",
|
||||
" list2.append(dict2)\n",
|
||||
" i +=1\n",
|
||||
"x = mycol.insert_many(list2)\n",
|
||||
@@ -177,15 +170,15 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 55,
|
||||
"execution_count": 12,
|
||||
"id": "5f665c0f-8d30-4759-b7f8-fb7e13b98efa",
|
||||
"metadata": {
|
||||
"execution": {
|
||||
"iopub.execute_input": "2024-07-12T02:22:32.688999Z",
|
||||
"iopub.status.busy": "2024-07-12T02:22:32.688234Z",
|
||||
"iopub.status.idle": "2024-07-12T02:22:32.714379Z",
|
||||
"shell.execute_reply": "2024-07-12T02:22:32.713270Z",
|
||||
"shell.execute_reply.started": "2024-07-12T02:22:32.688928Z"
|
||||
"iopub.execute_input": "2024-08-11T11:26:41.537017Z",
|
||||
"iopub.status.busy": "2024-08-11T11:26:41.536326Z",
|
||||
"iopub.status.idle": "2024-08-11T11:26:41.562731Z",
|
||||
"shell.execute_reply": "2024-08-11T11:26:41.561622Z",
|
||||
"shell.execute_reply.started": "2024-08-11T11:26:41.536952Z"
|
||||
},
|
||||
"tags": []
|
||||
},
|
||||
@@ -194,28 +187,44 @@
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"118 no phone\n",
|
||||
"1 17692029838 0131-陈女士.pdf\n",
|
||||
"2 13126853113 0130-徐女士.pdf\n",
|
||||
"3 18612722507 0025-孟女士.pdf\n",
|
||||
"4 18210976084 0078-朱女士.pdf\n",
|
||||
"5 13521767089 0039-韩先生.pdf\n",
|
||||
"6 15829199503 0128-张女士.pdf\n",
|
||||
"7 13552463605 0041-朱女士.pdf\n",
|
||||
"8 13381478769 0132-梁先生.pdf\n",
|
||||
"9 18618393655 0094-谢先生.pdf\n",
|
||||
"10 13717668119 0093-李女士.pdf\n",
|
||||
"11 13366130427 0044-星先生.pdf\n",
|
||||
"12 15532789326 0102-王先生.pdf\n",
|
||||
"13 18141916681 0126-马女士.pdf\n",
|
||||
"14 13261687266 0129-薛女士.pdf\n",
|
||||
"15 13019252687 0037-张女士.pdf\n",
|
||||
"16 13522476263 0007-李女士.pdf\n",
|
||||
"17 13681204538 0038-路女士.pdf\n",
|
||||
"18 13611211739 0124-苗女士.pdf\n",
|
||||
"19 13716042706 0096-薛女士.pdf\n",
|
||||
"20 13716323886 0040-杨女士.pdf\n",
|
||||
"21 13464928996 0083-张先生.pdf\n"
|
||||
"5 no phone\n",
|
||||
"22 no phone\n",
|
||||
"19 no phone\n",
|
||||
"38 no phone\n",
|
||||
"25 no phone\n",
|
||||
"6 no phone\n",
|
||||
"8 no phone\n",
|
||||
"26 no phone\n",
|
||||
"15 no phone\n",
|
||||
"13 no phone\n",
|
||||
"20 no phone\n",
|
||||
"23 no phone\n",
|
||||
"27 no phone\n",
|
||||
"10 no phone\n",
|
||||
"21 no phone\n",
|
||||
"3 no phone\n",
|
||||
"30 no phone\n",
|
||||
"11 no phone\n",
|
||||
"14 no phone\n",
|
||||
"24 no phone\n",
|
||||
"1 15153309038 9-曹秀芹.pdf\n",
|
||||
"2 13573332133 17-段玉华.pdf\n",
|
||||
"3 13964491825 7-韩美华.pdf\n",
|
||||
"4 15553344004 1-张爱英.pdf\n",
|
||||
"5 15853389189 36-袁会富.pdf\n",
|
||||
"6 15069350919 16-王芹英.pdf\n",
|
||||
"7 15165846001 2-张俊华.pdf\n",
|
||||
"8 13070650793 18-肖翠花.pdf\n",
|
||||
"9 13455364491 35-王霞.pdf\n",
|
||||
"10 15853380767 28-肖爱英.pdf\n",
|
||||
"11 13646430765 29-梁桂岭.pdf\n",
|
||||
"12 13053316892 12-孙宗玲.pdf\n",
|
||||
"13 13287885248 31-杜婷.pdf\n",
|
||||
"14 13153385772 32-崔杰.pdf\n",
|
||||
"15 15169224472 33-姚桂银.pdf\n",
|
||||
"16 13583398468 4-尚永.pdf\n",
|
||||
"17 18653305998 37-李琳.pdf\n",
|
||||
"18 13869390557 34-徐爱锋.pdf\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -232,13 +241,13 @@
|
||||
"mydb = myclient[\"baogao\"]\n",
|
||||
"mycol = mydb[\"pdf\"]\n",
|
||||
"\n",
|
||||
"dw_jc = \"天宫院社区测试者\"\n",
|
||||
"filename = 'data/天宫院街道2024.json'\n",
|
||||
"dw_jc = \"淄博积家村测试者\"\n",
|
||||
"filename = 'data/积家基础数据2408.json'\n",
|
||||
"with open(filename,'r') as fl:\n",
|
||||
" dict1 = json.load(fl) \n",
|
||||
"dict2 = {}\n",
|
||||
"#place_id = 571315\n",
|
||||
"myquery = { \"place_id\": place_id }\n",
|
||||
"myquery = { \"place_id\": place_id,\"rq\":'20240811' }\n",
|
||||
"for x in mycol.find(myquery,{ \"_id\": 0, \"place_id\": 0}):\n",
|
||||
" code = int(x['fn'].split('-')[0])\n",
|
||||
" if str(code) in dict1.keys() and 'phone' in dict1[str(code)].keys():\n",
|
||||
@@ -293,15 +302,15 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 56,
|
||||
"execution_count": 13,
|
||||
"id": "4b2b5d76-665f-4dfe-bbd3-5c80abd8c3e3",
|
||||
"metadata": {
|
||||
"execution": {
|
||||
"iopub.execute_input": "2024-07-12T02:23:52.611111Z",
|
||||
"iopub.status.busy": "2024-07-12T02:23:52.610366Z",
|
||||
"iopub.status.idle": "2024-07-12T02:23:57.139855Z",
|
||||
"shell.execute_reply": "2024-07-12T02:23:57.138449Z",
|
||||
"shell.execute_reply.started": "2024-07-12T02:23:52.611041Z"
|
||||
"iopub.execute_input": "2024-08-11T11:28:21.443578Z",
|
||||
"iopub.status.busy": "2024-08-11T11:28:21.442841Z",
|
||||
"iopub.status.idle": "2024-08-11T11:28:25.277992Z",
|
||||
"shell.execute_reply": "2024-08-11T11:28:25.276474Z",
|
||||
"shell.execute_reply.started": "2024-08-11T11:28:21.443507Z"
|
||||
},
|
||||
"tags": []
|
||||
},
|
||||
@@ -311,27 +320,43 @@
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"no phone\n",
|
||||
"17692029838 send success\n",
|
||||
"13126853113 send success\n",
|
||||
"18612722507 send success\n",
|
||||
"18210976084 send success\n",
|
||||
"13521767089 send success\n",
|
||||
"15829199503 send success\n",
|
||||
"13552463605 send success\n",
|
||||
"13381478769 send success\n",
|
||||
"18618393655 send success\n",
|
||||
"13717668119 send success\n",
|
||||
"13366130427 send success\n",
|
||||
"15532789326 send success\n",
|
||||
"18141916681 send success\n",
|
||||
"13261687266 send success\n",
|
||||
"13019252687 send success\n",
|
||||
"13522476263 send success\n",
|
||||
"13681204538 send success\n",
|
||||
"13611211739 send success\n",
|
||||
"13716042706 send success\n",
|
||||
"13716323886 send success\n",
|
||||
"13464928996 send success\n"
|
||||
"no phone\n",
|
||||
"no phone\n",
|
||||
"no phone\n",
|
||||
"no phone\n",
|
||||
"no phone\n",
|
||||
"no phone\n",
|
||||
"no phone\n",
|
||||
"no phone\n",
|
||||
"no phone\n",
|
||||
"no phone\n",
|
||||
"no phone\n",
|
||||
"no phone\n",
|
||||
"no phone\n",
|
||||
"no phone\n",
|
||||
"no phone\n",
|
||||
"no phone\n",
|
||||
"no phone\n",
|
||||
"no phone\n",
|
||||
"no phone\n",
|
||||
"15153309038 send success\n",
|
||||
"13573332133 send success\n",
|
||||
"13964491825 send success\n",
|
||||
"15553344004 send success\n",
|
||||
"15853389189 send success\n",
|
||||
"15069350919 send success\n",
|
||||
"15165846001 send success\n",
|
||||
"13070650793 send success\n",
|
||||
"13455364491 send success\n",
|
||||
"15853380767 send success\n",
|
||||
"13646430765 send success\n",
|
||||
"13053316892 send success\n",
|
||||
"13287885248 send success\n",
|
||||
"13153385772 send success\n",
|
||||
"15169224472 send success\n",
|
||||
"13583398468 send success\n",
|
||||
"18653305998 send success\n",
|
||||
"13869390557 send success\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -348,12 +373,13 @@
|
||||
"mydb = myclient[\"baogao\"]\n",
|
||||
"mycol = mydb[\"pdf\"]\n",
|
||||
"\n",
|
||||
"filename = 'data/天宫院街道2024.json'\n",
|
||||
"dw_jc = \"淄博积家村测试者\"\n",
|
||||
"filename = 'data/积家基础数据2408.json'\n",
|
||||
"with open(filename,'r') as fl:\n",
|
||||
" dict1 = json.load(fl) \n",
|
||||
"dict2 = {}\n",
|
||||
"#place_id = 571315\n",
|
||||
"myquery = { \"place_id\": place_id }\n",
|
||||
"myquery = { \"place_id\": place_id,\"rq\":'20240811' }\n",
|
||||
"for x in mycol.find(myquery,{ \"_id\": 0, \"place_id\": 0}):\n",
|
||||
" code = int(x['fn'].split('-')[0])\n",
|
||||
" if str(code) in dict1.keys() and 'phone' in dict1[str(code)].keys():\n",
|
||||
@@ -361,7 +387,7 @@
|
||||
" else:\n",
|
||||
" print('no phone')\n",
|
||||
"#print(dict2)\n",
|
||||
"dw_jc = \"天宫院社区测试者\"\n",
|
||||
"dw_jc = \"世纪花园测试者\"\n",
|
||||
"#dict2 = {375: {'phone': '13793180751', 'code': '0379208'}}\n",
|
||||
"for k, v in dict2.items():\n",
|
||||
" phone = '+86'+v['phone']\n",
|
||||
@@ -417,15 +443,15 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 54,
|
||||
"execution_count": 9,
|
||||
"id": "25a269c3-758f-4e79-ae6d-a6e6f161d64b",
|
||||
"metadata": {
|
||||
"execution": {
|
||||
"iopub.execute_input": "2024-07-12T02:20:13.833627Z",
|
||||
"iopub.status.busy": "2024-07-12T02:20:13.832897Z",
|
||||
"iopub.status.idle": "2024-07-12T02:20:14.097306Z",
|
||||
"shell.execute_reply": "2024-07-12T02:20:14.095871Z",
|
||||
"shell.execute_reply.started": "2024-07-12T02:20:13.833565Z"
|
||||
"iopub.execute_input": "2024-08-11T10:49:44.708154Z",
|
||||
"iopub.status.busy": "2024-08-11T10:49:44.707426Z",
|
||||
"iopub.status.idle": "2024-08-11T10:49:44.956435Z",
|
||||
"shell.execute_reply": "2024-08-11T10:49:44.954940Z",
|
||||
"shell.execute_reply.started": "2024-08-11T10:49:44.708083Z"
|
||||
},
|
||||
"tags": []
|
||||
},
|
||||
@@ -434,7 +460,6 @@
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"no phone\n",
|
||||
"+8613793180751 send success\n"
|
||||
]
|
||||
}
|
||||
@@ -452,12 +477,12 @@
|
||||
"mydb = myclient[\"baogao\"]\n",
|
||||
"mycol = mydb[\"pdf\"]\n",
|
||||
"\n",
|
||||
"filename = 'data/天宫院街道2024.json'\n",
|
||||
"filename = 'data/世纪花园基础数据240808.json'\n",
|
||||
"with open(filename,'r') as fl:\n",
|
||||
" dict1 = json.load(fl) \n",
|
||||
"dict2 = {}\n",
|
||||
"\n",
|
||||
"myquery = { \"place_id\": place_id }\n",
|
||||
"#place_id = 571315\n",
|
||||
"myquery = { \"place_id\": place_id,\"rq\":'20240811' }\n",
|
||||
"for x in mycol.find(myquery,{ \"_id\": 0, \"place_id\": 0}):\n",
|
||||
" code = int(x['fn'].split('-')[0])\n",
|
||||
" if str(code) in dict1.keys() and 'phone' in dict1[str(code)].keys():\n",
|
||||
@@ -465,10 +490,10 @@
|
||||
" else:\n",
|
||||
" print('no phone')\n",
|
||||
"#print(dict2)\n",
|
||||
"dw_jc = \"天宫院社区\"\n",
|
||||
"dw_jc = \"世纪花园测试者\"\n",
|
||||
"\n",
|
||||
"phone = '+86'+'13793180751'\n",
|
||||
"yzm = '12164'\n",
|
||||
"yzm = '05403'\n",
|
||||
"try: \n",
|
||||
" secretId = \"AKID22rVyvSqbikXFFvav31ykc9YmqjN6KYc\"\n",
|
||||
" secretKey = \"51XVL1YxDKI6mJh8au6DDuTskS1RhwJX\"\n",
|
||||
@@ -545,34 +570,12 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 57,
|
||||
"execution_count": null,
|
||||
"id": "411e89ed-8bb2-478b-b180-52188f800adc",
|
||||
"metadata": {
|
||||
"execution": {
|
||||
"iopub.execute_input": "2024-07-12T02:30:44.525202Z",
|
||||
"iopub.status.busy": "2024-07-12T02:30:44.524449Z",
|
||||
"iopub.status.idle": "2024-07-12T02:30:44.747772Z",
|
||||
"shell.execute_reply": "2024-07-12T02:30:44.746311Z",
|
||||
"shell.execute_reply.started": "2024-07-12T02:30:44.525114Z"
|
||||
},
|
||||
"tags": []
|
||||
},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"{\n",
|
||||
" \"SendStatusStatistics\": {\n",
|
||||
" \"FeeCount\": 120,\n",
|
||||
" \"RequestCount\": 120,\n",
|
||||
" \"RequestSuccessCount\": 120\n",
|
||||
" },\n",
|
||||
" \"RequestId\": \"6324eb3d-4a13-46ff-b555-c4e815f89f1f\"\n",
|
||||
"}\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"from tencentcloud.common import credential\n",
|
||||
"from tencentcloud.common.exception.tencent_cloud_sdk_exception import TencentCloudSDKException\n",
|
||||
@@ -633,30 +636,12 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 58,
|
||||
"execution_count": null,
|
||||
"id": "50183bba-2f9d-4003-98a7-0ecda96670ef",
|
||||
"metadata": {
|
||||
"execution": {
|
||||
"iopub.execute_input": "2024-07-12T02:30:54.613078Z",
|
||||
"iopub.status.busy": "2024-07-12T02:30:54.612334Z",
|
||||
"iopub.status.idle": "2024-07-12T02:30:54.837767Z",
|
||||
"shell.execute_reply": "2024-07-12T02:30:54.836760Z",
|
||||
"shell.execute_reply.started": "2024-07-12T02:30:54.613006Z"
|
||||
},
|
||||
"tags": []
|
||||
},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"{\n",
|
||||
" \"PullSmsSendStatusSet\": [],\n",
|
||||
" \"RequestId\": \"55765a6f-95a1-4c79-b55b-3fd3521df119\"\n",
|
||||
"}\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"from tencentcloud.common import credential\n",
|
||||
"from tencentcloud.common.exception.tencent_cloud_sdk_exception import TencentCloudSDKException\n",
|
||||
|
||||
Reference in new issue
Block a user