mdbq 3.4.4__py3-none-any.whl → 3.4.6__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- mdbq/aggregation/datashow.py +248 -239
- mdbq/aggregation/query_data.py +8 -8
- mdbq/spider/aikucun.py +1 -1
- {mdbq-3.4.4.dist-info → mdbq-3.4.6.dist-info}/METADATA +1 -1
- {mdbq-3.4.4.dist-info → mdbq-3.4.6.dist-info}/RECORD +7 -7
- {mdbq-3.4.4.dist-info → mdbq-3.4.6.dist-info}/WHEEL +0 -0
- {mdbq-3.4.4.dist-info → mdbq-3.4.6.dist-info}/top_level.txt +0 -0
mdbq/aggregation/datashow.py
CHANGED
@@ -22,18 +22,29 @@ from io import BytesIO
|
|
22
22
|
from PIL import Image
|
23
23
|
import base64
|
24
24
|
import matplotlib.pyplot as plt
|
25
|
+
from matplotlib import rcParams
|
25
26
|
|
26
27
|
from sqlalchemy.sql.functions import count
|
27
28
|
|
28
29
|
if platform.system() == 'Windows':
|
30
|
+
ip_address = '192.168.1.117'
|
31
|
+
rcParams['font.sans-serif'] = ['SimHei'] # matplotlibrc 防止中文乱码
|
29
32
|
D_PATH = os.path.join(f'C:\\Users\\{getpass.getuser()}\\Downloads')
|
30
33
|
elif platform.system() == 'Linux':
|
34
|
+
ip_address = '127.0.0.1'
|
35
|
+
rcParams['font.sans-serif'] = ['Arial Unicode MS'] # matplotlibrc 防止中文乱码
|
31
36
|
D_PATH = 'Downloads'
|
32
37
|
if not os.path.exists(D_PATH):
|
33
38
|
os.makedirs(D_PATH)
|
34
39
|
else:
|
40
|
+
ip_address = '127.0.0.1'
|
41
|
+
rcParams['font.sans-serif'] = ['Arial Unicode MS'] # matplotlibrc 防止中文乱码
|
35
42
|
D_PATH = os.path.join(f'/Users/{getpass.getuser()}/Downloads')
|
36
43
|
|
44
|
+
PORT = 5050
|
45
|
+
DIRECTORY = os.path.join(D_PATH, 'http_server')
|
46
|
+
|
47
|
+
rcParams['axes.unicode_minus'] = False # 防止负号'-'被当作减号处理
|
37
48
|
m_engine = mysql.MysqlUpload(username='', password='', host='', port=0, charset='utf8mb4')
|
38
49
|
company_engine = mysql.MysqlUpload(username='', password='', host='', port=0, charset='utf8mb4')
|
39
50
|
|
@@ -936,15 +947,9 @@ class DataShow:
|
|
936
947
|
pic_title1 = '商品花费占比'
|
937
948
|
img_file1 = os.path.join(temp_dir, f'{pic_title1}.png')
|
938
949
|
if not os.path.isfile(img_file1):
|
939
|
-
font_properties = {
|
940
|
-
'family': 'PingFang HK', # 字体类型 PingFang HK, Hiragino Sans GB, Arial Unicode MS
|
941
|
-
'size': 12, # 字体大小
|
942
|
-
'weight': 'light', # 字体粗细('light', 'normal', 'medium', 'semibold', 'bold', 'heavy', 'black')
|
943
|
-
'style': 'italic' # 字体样式('normal', 'italic', 'oblique')
|
944
|
-
}
|
945
950
|
fig, ax = plt.subplots()
|
946
951
|
ax.pie(df_new['花费'], labels=df_new['商品id'], autopct='%1.1f%%', startangle=140)
|
947
|
-
ax.set_title(pic_title1
|
952
|
+
ax.set_title(pic_title1) # 设置饼图的标题
|
948
953
|
ax.axis('equal') # 确保饼图是圆形的
|
949
954
|
plt.savefig(img_file1) # 保存饼图为PNG文件
|
950
955
|
plt.close()
|
@@ -980,195 +985,199 @@ class DataShow:
|
|
980
985
|
# 应用这个函数到图片列
|
981
986
|
df['Image_HTML'] = df['白底图'].apply(convert_image_to_html)
|
982
987
|
|
983
|
-
local_file1 = os.path.join(self.path, '多店推广场景.html')
|
984
|
-
local_file2 = os.path.join(self.path, '多店推广场景.html')
|
985
|
-
local_file3 = os.path.join(self.path, '多店推广场景.html')
|
986
|
-
local_file4 = os.path.join(self.path, '多店推广场景.html')
|
987
|
-
local_file5 = os.path.join(self.path, '多店推广场景.html')
|
988
|
-
|
989
988
|
# 创建 HTML
|
990
989
|
html_template = """
|
991
|
-
|
992
|
-
|
993
|
-
|
994
|
-
|
995
|
-
|
996
|
-
|
997
|
-
|
998
|
-
|
999
|
-
|
1000
|
-
|
1001
|
-
|
1002
|
-
|
1003
|
-
|
1004
|
-
|
1005
|
-
|
1006
|
-
|
1007
|
-
|
1008
|
-
|
1009
|
-
|
1010
|
-
|
1011
|
-
|
1012
|
-
|
1013
|
-
|
1014
|
-
|
1015
|
-
|
1016
|
-
|
1017
|
-
|
1018
|
-
|
1019
|
-
|
1020
|
-
|
1021
|
-
|
1022
|
-
|
1023
|
-
|
1024
|
-
|
1025
|
-
|
1026
|
-
|
1027
|
-
|
1028
|
-
|
1029
|
-
|
1030
|
-
|
1031
|
-
|
1032
|
-
|
1033
|
-
|
1034
|
-
|
1035
|
-
|
1036
|
-
|
1037
|
-
|
1038
|
-
|
1039
|
-
|
1040
|
-
|
1041
|
-
|
1042
|
-
|
1043
|
-
|
1044
|
-
|
1045
|
-
|
1046
|
-
|
1047
|
-
|
1048
|
-
|
1049
|
-
|
1050
|
-
|
1051
|
-
|
1052
|
-
|
1053
|
-
|
1054
|
-
|
1055
|
-
|
1056
|
-
|
1057
|
-
|
1058
|
-
|
1059
|
-
|
1060
|
-
|
1061
|
-
|
1062
|
-
|
1063
|
-
|
1064
|
-
|
1065
|
-
|
1066
|
-
|
1067
|
-
|
1068
|
-
|
1069
|
-
|
1070
|
-
|
1071
|
-
|
1072
|
-
|
1073
|
-
|
1074
|
-
|
1075
|
-
|
1076
|
-
|
1077
|
-
|
1078
|
-
|
1079
|
-
|
1080
|
-
|
1081
|
-
|
1082
|
-
|
1083
|
-
|
1084
|
-
|
1085
|
-
|
1086
|
-
|
1087
|
-
|
1088
|
-
|
1089
|
-
|
1090
|
-
|
1091
|
-
|
1092
|
-
|
1093
|
-
|
1094
|
-
|
1095
|
-
|
1096
|
-
|
1097
|
-
|
1098
|
-
|
1099
|
-
|
1100
|
-
|
1101
|
-
|
1102
|
-
|
1103
|
-
|
1104
|
-
|
1105
|
-
|
1106
|
-
|
1107
|
-
|
1108
|
-
|
1109
|
-
|
1110
|
-
|
1111
|
-
|
1112
|
-
|
1113
|
-
|
1114
|
-
|
1115
|
-
|
1116
|
-
|
1117
|
-
|
1118
|
-
|
1119
|
-
|
1120
|
-
|
1121
|
-
|
1122
|
-
|
1123
|
-
|
1124
|
-
|
1125
|
-
|
1126
|
-
|
1127
|
-
|
1128
|
-
|
1129
|
-
|
1130
|
-
|
1131
|
-
|
1132
|
-
|
1133
|
-
|
1134
|
-
|
1135
|
-
|
1136
|
-
|
1137
|
-
|
1138
|
-
|
1139
|
-
|
1140
|
-
|
1141
|
-
|
1142
|
-
|
1143
|
-
|
1144
|
-
|
1145
|
-
|
1146
|
-
|
1147
|
-
|
1148
|
-
|
1149
|
-
|
1150
|
-
|
1151
|
-
|
1152
|
-
|
1153
|
-
|
1154
|
-
|
1155
|
-
|
1156
|
-
|
1157
|
-
|
1158
|
-
<
|
1159
|
-
|
1160
|
-
|
1161
|
-
|
1162
|
-
|
1163
|
-
|
1164
|
-
|
1165
|
-
|
1166
|
-
|
1167
|
-
|
1168
|
-
|
1169
|
-
|
1170
|
-
|
1171
|
-
|
990
|
+
<!DOCTYPE html>
|
991
|
+
<html lang="zh-CN">
|
992
|
+
<head>
|
993
|
+
<meta charset="UTF-8">
|
994
|
+
<meta http-equiv="Content-Type" content="text/html>
|
995
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
996
|
+
<title>商品推广数据</title>
|
997
|
+
<style>
|
998
|
+
body {
|
999
|
+
font-family: Arial, Helvetica, sans-serif;
|
1000
|
+
line-height: 1.6;
|
1001
|
+
margin: 0;
|
1002
|
+
padding: 0;
|
1003
|
+
background-color: #f4f4f4;
|
1004
|
+
}
|
1005
|
+
.centered-table {
|
1006
|
+
margin-top: 20px;
|
1007
|
+
margin-down: 100px;
|
1008
|
+
margin-left: auto;
|
1009
|
+
margin-right: auto;
|
1010
|
+
border-collapse: collapse; /* 可选,用于合并表格边框 */
|
1011
|
+
width: 60%; /* 设置表格宽度为父容器宽度的50%,或者你可以使用固定宽度 */
|
1012
|
+
}
|
1013
|
+
thead th {
|
1014
|
+
background-color: #f2f2f2; /* 设置表头背景颜色 */
|
1015
|
+
font-size: 16px; /* 增大表头字体 */
|
1016
|
+
font-weight: bold; /* 加粗表头字体 */
|
1017
|
+
text-align: center; /* 设置表头文本居中 */
|
1018
|
+
}
|
1019
|
+
caption {
|
1020
|
+
caption-side: top; /* 标题显示在表格上方 */
|
1021
|
+
font-size: 24px; /* 设置标题字体大小 */
|
1022
|
+
font-weight: bold; /* 设置标题字体加粗 */
|
1023
|
+
text-align: center; /* 设置标题文本居中 */
|
1024
|
+
margin-bottom: 20px; /* 为标题和表格之间添加间距 */
|
1025
|
+
}
|
1026
|
+
td, th {
|
1027
|
+
border: 1px solid #ddd; /* 单元格边框 */
|
1028
|
+
line-height: 1em; /* 设置行高为2倍的当前字体大小 */
|
1029
|
+
padding: 5 5px; /* 设置左右边距,内边距增加单元格的整体高度 */
|
1030
|
+
text-align: center; /* 设置文本对齐方式 */
|
1031
|
+
}
|
1032
|
+
img {
|
1033
|
+
width: 80px; /* 设置图片宽度 */
|
1034
|
+
height: auto; /* 高度自动调整以保持宽高比 */
|
1035
|
+
/* 如果需要垂直居中且图片是块级元素,则可以使用以下样式(但通常不是必需的,因为图片默认是内联元素)
|
1036
|
+
text-align: center; /* 水平居中(适用于内联或块级子元素) */
|
1037
|
+
display: block;
|
1038
|
+
margin: 0 auto; */
|
1039
|
+
}
|
1040
|
+
button {
|
1041
|
+
border: none;
|
1042
|
+
padding: 8px 12px;
|
1043
|
+
font-size: 14px;
|
1044
|
+
cursor: pointer;
|
1045
|
+
}
|
1046
|
+
.centered-text {
|
1047
|
+
position: fixed; /* 固定定位 */
|
1048
|
+
bottom: 15px; /* 距离页面顶部10px(可根据需要调整) */
|
1049
|
+
right: calc(25vw - 420px); /* 距离页面右侧1/4宽度减去文本自身的宽度和可能的边距(这里假设文本宽度和边距共10px,实际情况需根据文本样式调整) */
|
1050
|
+
/* 如果文本宽度未知或可变,可以只使用25vw并接受可能的溢出 */
|
1051
|
+
/* right: 25vw; */ /* 直接使用25vw定位,不考虑文本宽度 */
|
1052
|
+
padding: 3px 10px; /* 可选的文本内边距 */
|
1053
|
+
background-color: rgba(255, 255, 255, 0.8); /* 可选的背景色和透明度 */
|
1054
|
+
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); /* 可选的阴影效果 */
|
1055
|
+
}
|
1056
|
+
|
1057
|
+
.image-container {
|
1058
|
+
position: absolute; /* 使用绝对定位 */
|
1059
|
+
width: 15%; /* 设置图片宽度 */
|
1060
|
+
left: 10px; /* 距离页面左侧20px */
|
1061
|
+
top: 50%; /* 距离页面顶部50% */
|
1062
|
+
transform: translateY(-50%); /* 向上移动自身高度的一半,以实现垂直居中 */
|
1063
|
+
}
|
1064
|
+
.image-container img {
|
1065
|
+
width: 20%; /* 设置图片宽度 */
|
1066
|
+
height: auto; /* 高度自动调整以保持宽高比 */
|
1067
|
+
/* 如果需要垂直居中且图片是块级元素,则可以使用以下样式(但通常不是必需的,因为图片默认是内联元素)*/
|
1068
|
+
display: flex;
|
1069
|
+
flex-direction: column;
|
1070
|
+
align-items: flex-start;
|
1071
|
+
}
|
1072
|
+
.button1 {
|
1073
|
+
border: none;
|
1074
|
+
padding: 8px 12px;
|
1075
|
+
font-size: 14px;
|
1076
|
+
cursor: pointer;
|
1077
|
+
position: absolute; /* 使用绝对定位 */
|
1078
|
+
left: 5%; /* 距离页面左侧20px */
|
1079
|
+
top: 10%; /* 距离页面顶部50% */
|
1080
|
+
}
|
1081
|
+
.button2 {
|
1082
|
+
border: none;
|
1083
|
+
padding: 8px 12px;
|
1084
|
+
font-size: 14px;
|
1085
|
+
cursor: pointer;
|
1086
|
+
position: absolute; /* 使用绝对定位 */
|
1087
|
+
left: 5%; /* 距离页面左侧20px */
|
1088
|
+
top: 17%; /* 距离页面顶部50% */
|
1089
|
+
}
|
1090
|
+
.button3 {
|
1091
|
+
border: none;
|
1092
|
+
padding: 8px 12px;
|
1093
|
+
font-size: 14px;
|
1094
|
+
cursor: pointer;
|
1095
|
+
position: absolute; /* 使用绝对定位 */
|
1096
|
+
left: 5%; /* 距离页面左侧20px */
|
1097
|
+
top: 24%; /* 距离页面顶部50% */
|
1098
|
+
}
|
1099
|
+
.button4 {
|
1100
|
+
border: none;
|
1101
|
+
padding: 8px 12px;
|
1102
|
+
font-size: 14px;
|
1103
|
+
cursor: pointer;
|
1104
|
+
position: absolute; /* 使用绝对定位 */
|
1105
|
+
left: 5%; /* 距离页面左侧20px */
|
1106
|
+
top: 31%; /* 距离页面顶部50% */
|
1107
|
+
}
|
1108
|
+
.button5 {
|
1109
|
+
border: none;
|
1110
|
+
padding: 8px 12px;
|
1111
|
+
font-size: 14px;
|
1112
|
+
cursor: pointer;
|
1113
|
+
position: absolute; /* 使用绝对定位 */
|
1114
|
+
left: 5%; /* 距离页面左侧20px */
|
1115
|
+
top: 38%; /* 距离页面顶部50% */
|
1116
|
+
}
|
1117
|
+
</style>
|
1118
|
+
</head>
|
1119
|
+
|
1120
|
+
<div class="div-button">
|
1121
|
+
<!-- 创建一个按钮 -->
|
1122
|
+
<button id="button1" class="button1">多店推广场景</button>
|
1123
|
+
<button id="button2" class="button2">店铺流量来源</button>
|
1124
|
+
<button id="button3" class="button3">达摩盘人群画像</button>
|
1125
|
+
<button id="button4" class="button4">商品人群画像</button>
|
1126
|
+
<button id="button5" class="button5">销售地域分布</button>
|
1127
|
+
</div>
|
1128
|
+
<script>
|
1129
|
+
// 获取按钮元素
|
1130
|
+
var tg = document.getElementById('button1');
|
1131
|
+
var dpll = document.getElementById('button2');
|
1132
|
+
var dmp1 = document.getElementById('button3');
|
1133
|
+
var dmp2 = document.getElementById('button4');
|
1134
|
+
var syj = document.getElementById('button5');
|
1135
|
+
tg.addEventListener('click', function() {
|
1136
|
+
window.open('{local_file1}', '_blank');
|
1137
|
+
});
|
1138
|
+
dpll.addEventListener('click', function() {
|
1139
|
+
window.open('{local_file2}', '_blank');
|
1140
|
+
});
|
1141
|
+
dmp1.addEventListener('click', function() {
|
1142
|
+
window.open('{local_file3}', '_blank');
|
1143
|
+
});
|
1144
|
+
dmp2.addEventListener('click', function() {
|
1145
|
+
window.open('{local_file4}', '_blank');
|
1146
|
+
});
|
1147
|
+
syj.addEventListener('click', function() {
|
1148
|
+
window.open('{local_file5}', '_blank');
|
1149
|
+
});
|
1150
|
+
</script>
|
1151
|
+
|
1152
|
+
<p class="centered-text">统计周期</p>
|
1153
|
+
<!--
|
1154
|
+
<img class="image-container" src="{img_file1}" alt="图片">
|
1155
|
+
-->
|
1156
|
+
<table class="centered-table">
|
1157
|
+
<thead>
|
1158
|
+
<caption>天猫商品推广数据</caption>
|
1159
|
+
<div>
|
1160
|
+
<tr>
|
1161
|
+
<th>序号</th>
|
1162
|
+
<th>商品</th>
|
1163
|
+
<th>店铺名称</th>
|
1164
|
+
<th>商品id</th>
|
1165
|
+
<th>花费</th>
|
1166
|
+
<th>花费占比</th>
|
1167
|
+
<th>点击量</th>
|
1168
|
+
<th>加购量</th>
|
1169
|
+
<th>成交笔数</th>
|
1170
|
+
<th>成交金额</th>
|
1171
|
+
<th>roi投产</th>
|
1172
|
+
</tr>
|
1173
|
+
</div>
|
1174
|
+
</thead>
|
1175
|
+
<tbody>
|
1176
|
+
{rows}
|
1177
|
+
</tbody>
|
1178
|
+
</table>
|
1179
|
+
</html>
|
1180
|
+
"""
|
1172
1181
|
rows = []
|
1173
1182
|
for _, row in df.iterrows():
|
1174
1183
|
row_html = (f'<tr>'
|
@@ -1189,13 +1198,13 @@ class DataShow:
|
|
1189
1198
|
|
1190
1199
|
final_html = html_template.replace('{rows}', ''.join(rows))
|
1191
1200
|
final_html = final_html.replace('统计周期', f'统计周期: {min_date} ~ {max_date}')
|
1192
|
-
final_html = final_html.replace('{local_file1}',
|
1193
|
-
final_html = final_html.replace('{local_file2}',
|
1194
|
-
final_html = final_html.replace('{local_file3}',
|
1195
|
-
final_html = final_html.replace('{local_file4}',
|
1196
|
-
final_html = final_html.replace('{local_file5}',
|
1201
|
+
final_html = final_html.replace('{local_file1}', '多店推广场景.html')
|
1202
|
+
final_html = final_html.replace('{local_file2}', '店铺流量来源.html')
|
1203
|
+
final_html = final_html.replace('{local_file3}', '达摩盘人群画像.html')
|
1204
|
+
final_html = final_html.replace('{local_file4}', '商品人群画像.html')
|
1205
|
+
final_html = final_html.replace('{local_file5}', '销售地域分布.html')
|
1197
1206
|
file = os.path.join(self.path, f'{filename}.html')
|
1198
|
-
with open(file, 'w') as f:
|
1207
|
+
with open(file, 'w', encoding='utf-8') as f:
|
1199
1208
|
f.write(final_html)
|
1200
1209
|
|
1201
1210
|
|
@@ -1210,45 +1219,45 @@ def main():
|
|
1210
1219
|
start_date='2024-12-01',
|
1211
1220
|
end_date=None,
|
1212
1221
|
)
|
1213
|
-
# 店铺流量来源
|
1214
|
-
ds.dpll()
|
1215
|
-
# 多店聚合推广数据
|
1216
|
-
ds.tg(
|
1217
|
-
|
1218
|
-
|
1219
|
-
|
1220
|
-
)
|
1221
|
-
|
1222
|
-
# 商品人群画像
|
1223
|
-
item_id_list = [
|
1224
|
-
|
1225
|
-
]
|
1226
|
-
for item_id in item_id_list:
|
1227
|
-
|
1228
|
-
|
1229
|
-
|
1230
|
-
|
1231
|
-
|
1232
|
-
|
1233
|
-
|
1234
|
-
|
1235
|
-
# 达摩盘人群画像
|
1236
|
-
crowid_list = [
|
1237
|
-
|
1238
|
-
]
|
1239
|
-
for crowid in crowid_list:
|
1240
|
-
|
1241
|
-
|
1242
|
-
|
1243
|
-
|
1244
|
-
|
1245
|
-
ds.pov_city(
|
1246
|
-
|
1247
|
-
|
1248
|
-
|
1249
|
-
|
1250
|
-
|
1251
|
-
)
|
1222
|
+
# # 店铺流量来源
|
1223
|
+
# ds.dpll()
|
1224
|
+
# # 多店聚合推广数据
|
1225
|
+
# ds.tg(
|
1226
|
+
# days=15,
|
1227
|
+
# # start_date='2024-11-01',
|
1228
|
+
# # end_date='2024-11-30',
|
1229
|
+
# )
|
1230
|
+
#
|
1231
|
+
# # 商品人群画像
|
1232
|
+
# item_id_list = [
|
1233
|
+
# 839148235697,
|
1234
|
+
# ]
|
1235
|
+
# for item_id in item_id_list:
|
1236
|
+
# ds.item_crowd(
|
1237
|
+
# item_id=item_id,
|
1238
|
+
# lab='全部渠道',
|
1239
|
+
# option='商详浏览',
|
1240
|
+
# last_date=None,
|
1241
|
+
# d_str='近30天',
|
1242
|
+
# )
|
1243
|
+
#
|
1244
|
+
# # 达摩盘人群画像
|
1245
|
+
# crowid_list = [
|
1246
|
+
# 40457166,
|
1247
|
+
# ]
|
1248
|
+
# for crowid in crowid_list:
|
1249
|
+
# ds.crowd(
|
1250
|
+
# crowd_id=crowid,
|
1251
|
+
# last_date=None,
|
1252
|
+
# )
|
1253
|
+
#
|
1254
|
+
# ds.pov_city(
|
1255
|
+
# db_name='生意经3',
|
1256
|
+
# filename='销售地域分布',
|
1257
|
+
# start_date='2024-12-01',
|
1258
|
+
# end_date=None,
|
1259
|
+
# percent=0.015,
|
1260
|
+
# )
|
1252
1261
|
|
1253
1262
|
|
1254
1263
|
if __name__ == '__main__':
|
mdbq/aggregation/query_data.py
CHANGED
@@ -3887,10 +3887,10 @@ def main(days=150, months=3):
|
|
3887
3887
|
|
3888
3888
|
|
3889
3889
|
if __name__ == '__main__':
|
3890
|
-
|
3891
|
-
|
3892
|
-
|
3893
|
-
|
3890
|
+
main(
|
3891
|
+
days=30, # 清理聚合数据的日期长度
|
3892
|
+
months=2 # 生成聚合数据的长度
|
3893
|
+
)
|
3894
3894
|
|
3895
3895
|
# query_list = [query1, query2]
|
3896
3896
|
# # 使用 ThreadPoolExecutor 来并行运行
|
@@ -3914,10 +3914,10 @@ if __name__ == '__main__':
|
|
3914
3914
|
|
3915
3915
|
# query3(months=2, less_dict=[])
|
3916
3916
|
|
3917
|
-
sdq = MysqlDatasQuery() # 实例化数据处理类
|
3918
|
-
sdq.months = 1 # 设置数据周期, 1 表示近 2 个月
|
3919
|
-
sdq.update_service = True # 调试时加,true: 将数据写入 mysql 服务器
|
3920
|
-
sdq.item_up()
|
3917
|
+
# sdq = MysqlDatasQuery() # 实例化数据处理类
|
3918
|
+
# sdq.months = 1 # 设置数据周期, 1 表示近 2 个月
|
3919
|
+
# sdq.update_service = True # 调试时加,true: 将数据写入 mysql 服务器
|
3920
|
+
# sdq.item_up()
|
3921
3921
|
|
3922
3922
|
# string = '30-34岁,35-39岁,40-49岁'
|
3923
3923
|
# d = "~".join(re.findall(r'(\d+)\D.*\D(\d+)岁', string)[0])
|
mdbq/spider/aikucun.py
CHANGED
@@ -2,9 +2,9 @@ mdbq/__init__.py,sha256=Il5Q9ATdX8yXqVxtP_nYqUhExzxPC_qk_WXQ_4h0exg,16
|
|
2
2
|
mdbq/__version__.py,sha256=y9Mp_8x0BCZSHsdLT_q5tX9wZwd5QgqrSIENLrb6vXA,62
|
3
3
|
mdbq/aggregation/__init__.py,sha256=EeDqX2Aml6SPx8363J-v1lz0EcZtgwIBYyCJV6CcEDU,40
|
4
4
|
mdbq/aggregation/aggregation.py,sha256=-yzApnlqSN2L0E1YMu5ml-W827qpKQvWPCOI7jj2kzY,80264
|
5
|
-
mdbq/aggregation/datashow.py,sha256=
|
5
|
+
mdbq/aggregation/datashow.py,sha256=1AYSIDkdUx-4as1Ax2rPj0cExM9d-qFMrFYLAaPHNuk,54962
|
6
6
|
mdbq/aggregation/optimize_data.py,sha256=RXIv7cACCgYyehAxMjUYi_S7rVyjIwXKWMaM3nduGtA,3068
|
7
|
-
mdbq/aggregation/query_data.py,sha256=
|
7
|
+
mdbq/aggregation/query_data.py,sha256=CRbc4Lf-Ql3SBb9BY-0SdRQTlRDE1D4DG_3Tmx4483s,178890
|
8
8
|
mdbq/bdup/__init__.py,sha256=AkhsGk81SkG1c8FqDH5tRq-8MZmFobVbN60DTyukYTY,28
|
9
9
|
mdbq/bdup/bdup.py,sha256=LAV0TgnQpc-LB-YuJthxb0U42_VkPidzQzAagan46lU,4234
|
10
10
|
mdbq/config/__init__.py,sha256=jso1oHcy6cJEfa7udS_9uO5X6kZLoPBF8l3wCYmr5dM,18
|
@@ -33,8 +33,8 @@ mdbq/pbix/pbix_refresh.py,sha256=JUjKW3bNEyoMVfVfo77UhguvS5AWkixvVhDbw4_MHco,239
|
|
33
33
|
mdbq/pbix/refresh_all.py,sha256=OBT9EewSZ0aRS9vL_FflVn74d4l2G00wzHiikCC4TC0,5926
|
34
34
|
mdbq/pbix/refresh_all_old.py,sha256=_pq3WSQ728GPtEG5pfsZI2uTJhU8D6ra-htIk1JXYzw,7192
|
35
35
|
mdbq/spider/__init__.py,sha256=RBMFXGy_jd1HXZhngB2T2XTvJqki8P_Fr-pBcwijnew,18
|
36
|
-
mdbq/spider/aikucun.py,sha256=
|
37
|
-
mdbq-3.4.
|
38
|
-
mdbq-3.4.
|
39
|
-
mdbq-3.4.
|
40
|
-
mdbq-3.4.
|
36
|
+
mdbq/spider/aikucun.py,sha256=zOacjrJ3MvToyuugA68xB-oN6RKj8K3GxMKudnln9EA,22207
|
37
|
+
mdbq-3.4.6.dist-info/METADATA,sha256=vkPu6J2sEW1O7DV1Q4eufPEKnbTsj0v5_1plFdfGj-k,243
|
38
|
+
mdbq-3.4.6.dist-info/WHEEL,sha256=eOLhNAGa2EW3wWl_TU484h7q1UNgy0JXjjoqKoxAAQc,92
|
39
|
+
mdbq-3.4.6.dist-info/top_level.txt,sha256=2FQ-uLnCSB-OwFiWntzmwosW3X2Xqsg0ewh1axsaylA,5
|
40
|
+
mdbq-3.4.6.dist-info/RECORD,,
|
File without changes
|
File without changes
|