mdbq 3.7.14__py3-none-any.whl → 3.7.16__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/optimize_data.py +11 -1
- mdbq/aggregation/query_data.py +13 -1
- mdbq/config/default.py +0 -8
- mdbq/config/products.py +12 -1
- mdbq/log/spider_logging.py +0 -9
- mdbq/other/download_sku_picture.py +13 -1
- mdbq/redis/getredis.py +12 -1
- mdbq/spider/aikucun.py +12 -1
- {mdbq-3.7.14.dist-info → mdbq-3.7.16.dist-info}/METADATA +1 -1
- {mdbq-3.7.14.dist-info → mdbq-3.7.16.dist-info}/RECORD +12 -13
- {mdbq-3.7.14.dist-info → mdbq-3.7.16.dist-info}/WHEEL +1 -1
- mdbq/aggregation/datashow_bak.py +0 -1264
- {mdbq-3.7.14.dist-info → mdbq-3.7.16.dist-info}/top_level.txt +0 -0
@@ -10,7 +10,17 @@ import logging
|
|
10
10
|
"""
|
11
11
|
对指定数据库所有冗余数据进行清理
|
12
12
|
"""
|
13
|
-
|
13
|
+
hostname = 'xigua_lx' # 正常情况下 spider_tg 只会在 xigua_lx 或者 xigua1 运行,且都指向主库
|
14
|
+
local = 'remoto'
|
15
|
+
targe_host = socket.gethostname()
|
16
|
+
if targe_host == 'xigua_lx':
|
17
|
+
local = 'local' # 直接指向局域网地址
|
18
|
+
elif targe_host in ['localhost.localdomain', 'xigua1']:
|
19
|
+
targe_host = 'xigua1' # 修正 Linux 系统用户名
|
20
|
+
local = 'local' # 直接指向局域网地址
|
21
|
+
elif targe_host == 'MacBookPro':
|
22
|
+
local = 'local' # 直接指向局域网地址
|
23
|
+
m_engine, username, password, host, port = default.get_mysql_engine(platform='Windows', hostname=hostname, sql='mysql', local=local, config_file=None)
|
14
24
|
if not username:
|
15
25
|
logger.info(f'找不到主机:')
|
16
26
|
|
mdbq/aggregation/query_data.py
CHANGED
@@ -21,12 +21,24 @@ import concurrent.futures
|
|
21
21
|
import traceback
|
22
22
|
import logging
|
23
23
|
import sys
|
24
|
+
import socket
|
24
25
|
|
25
26
|
"""
|
26
27
|
|
27
28
|
"""
|
28
29
|
dirname = os.path.join(os.path.realpath(os.path.dirname(sys.argv[0])), 'support')
|
29
|
-
|
30
|
+
hostname = 'xigua_lx' # 正常情况下 spider_tg 只会在 xigua_lx 或者 xigua1 运行,且都指向主库
|
31
|
+
local = 'remoto'
|
32
|
+
targe_host = socket.gethostname()
|
33
|
+
|
34
|
+
if targe_host == 'xigua_lx':
|
35
|
+
local = 'local' # 直接指向局域网地址
|
36
|
+
elif targe_host in ['localhost.localdomain', 'xigua1']:
|
37
|
+
targe_host = 'xigua1' # 修正 Linux 系统用户名
|
38
|
+
local = 'local' # 直接指向局域网地址
|
39
|
+
elif targe_host == 'MacBookPro':
|
40
|
+
local = 'local' # 直接指向局域网地址
|
41
|
+
m_engine, username, password, host, port = default.get_mysql_engine(platform='Windows', hostname=hostname, sql='mysql', local=local, config_file=None)
|
30
42
|
logger = logging.getLogger(__name__)
|
31
43
|
|
32
44
|
|
mdbq/config/default.py
CHANGED
@@ -2,18 +2,10 @@
|
|
2
2
|
import os
|
3
3
|
import sys
|
4
4
|
import json
|
5
|
-
# import platform
|
6
|
-
# import getpass
|
7
5
|
import socket
|
8
6
|
import logging
|
9
7
|
from mdbq.mysql import mysql
|
10
8
|
|
11
|
-
# if platform.system() == 'Windows':
|
12
|
-
# support_path = r'C:\数据中心2\support'
|
13
|
-
# elif platform.system() == 'Darwin':
|
14
|
-
# support_path = f'/Users/{getpass.getuser()}/数据中心2/support'
|
15
|
-
# else:
|
16
|
-
# support_path = '数据中心2/support' # 没有用, 可以删
|
17
9
|
support_path = os.path.join(os.path.realpath(os.path.dirname(sys.argv[0])), 'support')
|
18
10
|
logger = logging.getLogger(__name__)
|
19
11
|
|
mdbq/config/products.py
CHANGED
@@ -13,7 +13,18 @@ from numpy.ma.core import product
|
|
13
13
|
天猫货品年份基准对照
|
14
14
|
用于聚合数据,通过此数据表进一步可确定商品上架年月
|
15
15
|
"""
|
16
|
-
|
16
|
+
hostname = 'xigua_lx' # 正常情况下 spider_tg 只会在 xigua_lx 或者 xigua1 运行,且都指向主库
|
17
|
+
local = 'remoto'
|
18
|
+
targe_host = socket.gethostname()
|
19
|
+
|
20
|
+
if targe_host == 'xigua_lx':
|
21
|
+
local = 'local' # 直接指向局域网地址
|
22
|
+
elif targe_host in ['localhost.localdomain', 'xigua1']:
|
23
|
+
targe_host = 'xigua1' # 修正 Linux 系统用户名
|
24
|
+
local = 'local' # 直接指向局域网地址
|
25
|
+
elif targe_host == 'MacBookPro':
|
26
|
+
local = 'local' # 直接指向局域网地址
|
27
|
+
m_engine, username, password, host, port = default.get_mysql_engine(platform='Windows', hostname=hostname, sql='mysql', local=local, config_file=None)
|
17
28
|
if not username:
|
18
29
|
print(f'找不到主机1:')
|
19
30
|
|
mdbq/log/spider_logging.py
CHANGED
@@ -10,15 +10,6 @@ def setup_logging(reMoveOldHandler=True):
|
|
10
10
|
"""
|
11
11
|
reMoveOldHandler: 替换根日志记录器的所有现有处理器
|
12
12
|
"""
|
13
|
-
# if platform.system() == 'Windows':
|
14
|
-
# from mdbq.pbix import refresh_all
|
15
|
-
# D_PATH = os.path.join(f'C:\\Users\\{getpass.getuser()}\\Downloads')
|
16
|
-
# elif platform.system() == 'Linux':
|
17
|
-
# D_PATH = os.path.join(os.path.realpath(os.path.dirname(sys.argv[0])), 'Downloads')
|
18
|
-
# if not os.path.exists(D_PATH):
|
19
|
-
# os.makedirs(D_PATH)
|
20
|
-
# else:
|
21
|
-
# D_PATH = os.path.join(f'/Users/{getpass.getuser()}/Downloads')
|
22
13
|
D_PATH = os.path.join(os.path.realpath(os.path.dirname(sys.argv[0])))
|
23
14
|
|
24
15
|
if not os.path.isdir(os.path.join(D_PATH, 'logfile')):
|
@@ -50,7 +50,19 @@ upload_path = os.path.join(D_PATH, '数据上传中心') # 此目录位于下
|
|
50
50
|
if not os.path.exists(upload_path): # 数据中心根目录
|
51
51
|
os.makedirs(upload_path)
|
52
52
|
|
53
|
-
|
53
|
+
hostname = 'xigua_lx' # 正常情况下 spider_tg 只会在 xigua_lx 或者 xigua1 运行,且都指向主库
|
54
|
+
local = 'remoto'
|
55
|
+
targe_host = socket.gethostname()
|
56
|
+
|
57
|
+
if targe_host == 'xigua_lx':
|
58
|
+
local = 'local' # 直接指向局域网地址
|
59
|
+
elif targe_host in ['localhost.localdomain', 'xigua1']:
|
60
|
+
targe_host = 'xigua1' # 修正 Linux 系统用户名
|
61
|
+
local = 'local' # 直接指向局域网地址
|
62
|
+
elif targe_host == 'MacBookPro':
|
63
|
+
local = 'local' # 直接指向局域网地址
|
64
|
+
|
65
|
+
m_engine, username, password, host, port = default.get_mysql_engine(platform='Windows', hostname=hostname, sql='mysql', local=local, config_file=None)
|
54
66
|
if not username:
|
55
67
|
print(f'找不到主机:')
|
56
68
|
|
mdbq/redis/getredis.py
CHANGED
@@ -18,7 +18,18 @@ import platform
|
|
18
18
|
from decimal import Decimal
|
19
19
|
import orjson
|
20
20
|
|
21
|
-
|
21
|
+
hostname = 'xigua_lx' # 正常情况下 spider_tg 只会在 xigua_lx 或者 xigua1 运行,且都指向主库
|
22
|
+
local = 'remoto'
|
23
|
+
targe_host = socket.gethostname()
|
24
|
+
|
25
|
+
if targe_host == 'xigua_lx':
|
26
|
+
local = 'local' # 直接指向局域网地址
|
27
|
+
elif targe_host in ['localhost.localdomain', 'xigua1']:
|
28
|
+
targe_host = 'xigua1' # 修正 Linux 系统用户名
|
29
|
+
local = 'local' # 直接指向局域网地址
|
30
|
+
elif targe_host == 'MacBookPro':
|
31
|
+
local = 'local' # 直接指向局域网地址
|
32
|
+
m_engine, username, password, host, port = default.get_mysql_engine(platform='Windows', hostname=hostname, sql='mysql', local=local, config_file=None)
|
22
33
|
|
23
34
|
# 获取当前模块的日志记录器
|
24
35
|
logger = logging.getLogger(__name__)
|
mdbq/spider/aikucun.py
CHANGED
@@ -38,7 +38,18 @@ else:
|
|
38
38
|
D_PATH = str(pathlib.Path(f'/Users/{getpass.getuser()}/Downloads'))
|
39
39
|
upload_path = os.path.join(D_PATH, '数据上传中心', '爱库存') # 此目录位于下载文件夹
|
40
40
|
|
41
|
-
|
41
|
+
hostname = 'xigua_lx' # 正常情况下 spider_tg 只会在 xigua_lx 或者 xigua1 运行,且都指向主库
|
42
|
+
local = 'remoto'
|
43
|
+
targe_host = socket.gethostname()
|
44
|
+
|
45
|
+
if targe_host == 'xigua_lx':
|
46
|
+
local = 'local' # 直接指向局域网地址
|
47
|
+
elif targe_host in ['localhost.localdomain', 'xigua1']:
|
48
|
+
targe_host = 'xigua1' # 修正 Linux 系统用户名
|
49
|
+
local = 'local' # 直接指向局域网地址
|
50
|
+
elif targe_host == 'MacBookPro':
|
51
|
+
local = 'local' # 直接指向局域网地址
|
52
|
+
m_engine, username, password, host, port = default.get_mysql_engine(platform='Windows', hostname=hostname, sql='mysql', local=local, config_file=None)
|
42
53
|
print(username, password, host, port)
|
43
54
|
# 实例化一个数据查询类,用来获取 cookies 表数据
|
44
55
|
download = s_query.QueryDatas(username=username, password=password, host=host, port=port)
|
@@ -1,28 +1,27 @@
|
|
1
1
|
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
|
-
mdbq/aggregation/
|
5
|
-
mdbq/aggregation/
|
6
|
-
mdbq/aggregation/query_data.py,sha256=jGKnHm9vRlKCZeIdP15lgpASKaQgoQjPZyd2IsTJY6k,174426
|
4
|
+
mdbq/aggregation/optimize_data.py,sha256=_bI9gIMiqO6mIiwcMEfMqTpclrHDF3G6dpo7uzSlZ4Q,1407
|
5
|
+
mdbq/aggregation/query_data.py,sha256=4y5sGSEpwCodZPEv6oC9aBJOAkYaRtVh4IQh-6MAf8s,174940
|
7
6
|
mdbq/bdup/__init__.py,sha256=AkhsGk81SkG1c8FqDH5tRq-8MZmFobVbN60DTyukYTY,28
|
8
7
|
mdbq/bdup/bdup.py,sha256=hJs815hGFwm_X5bP2i9XugG2w2ZY_F0n3-Q0hVpIPPw,4892
|
9
8
|
mdbq/config/__init__.py,sha256=jso1oHcy6cJEfa7udS_9uO5X6kZLoPBF8l3wCYmr5dM,18
|
10
|
-
mdbq/config/default.py,sha256
|
9
|
+
mdbq/config/default.py,sha256=-mSFxj5tluuPZw2pGRJkHESoX-x0WAHHO3sQzh8_DPE,4775
|
11
10
|
mdbq/config/myconfig.py,sha256=IEJOYoSiDivplE6N-1UWuVKUj6zLa4EOsuj3aONb85g,1000
|
12
|
-
mdbq/config/products.py,sha256=
|
11
|
+
mdbq/config/products.py,sha256=93YnQEqms2gacLaaPtnkEpjAe9-uTRSTkAcP_OC2wWk,6188
|
13
12
|
mdbq/config/set_support.py,sha256=eM2scqDzGNR2kkbYmguRB2ucrqeX0KMh5OMIaGsLem4,877
|
14
13
|
mdbq/dataframe/__init__.py,sha256=2HtCN8AdRj53teXDqzysC1h8aPL-mMFy561ESmhehGQ,22
|
15
14
|
mdbq/dataframe/converter.py,sha256=lETYhT7KXlWzWwqguqhk6vI6kj4rnOBEW1lhqKy2Abc,5035
|
16
15
|
mdbq/log/__init__.py,sha256=Mpbrav0s0ifLL7lVDAuePEi1hJKiSHhxcv1byBKDl5E,15
|
17
16
|
mdbq/log/mylogger.py,sha256=oaT7Bp-Hb9jZt52seP3ISUuxVcI19s4UiqTeouScBO0,3258
|
18
|
-
mdbq/log/spider_logging.py,sha256=
|
17
|
+
mdbq/log/spider_logging.py,sha256=59xe4Ckb7m-sBt3GYk8DC_hQg7-jnjBRq1o718r1Ry8,1676
|
19
18
|
mdbq/mongo/__init__.py,sha256=SILt7xMtQIQl_m-ik9WLtJSXIVf424iYgCfE_tnQFbw,13
|
20
19
|
mdbq/mysql/__init__.py,sha256=A_DPJyAoEvTSFojiI2e94zP0FKtCkkwKP1kYUCSyQzo,11
|
21
20
|
mdbq/mysql/mysql.py,sha256=bsv-khT7fyoYxEJMbJPks-V1tYvwX-mNHsoTNXfWiKk,95884
|
22
21
|
mdbq/mysql/s_query.py,sha256=pj5ioJfUT81Su9S-km9G49gF5F2MmXXfw_oAIUzhN28,8794
|
23
22
|
mdbq/mysql/year_month_day.py,sha256=VgewoE2pJxK7ErjfviL_SMTN77ki8GVbTUcao3vFUCE,1523
|
24
23
|
mdbq/other/__init__.py,sha256=jso1oHcy6cJEfa7udS_9uO5X6kZLoPBF8l3wCYmr5dM,18
|
25
|
-
mdbq/other/download_sku_picture.py,sha256=
|
24
|
+
mdbq/other/download_sku_picture.py,sha256=zmd02td0Wz2cv44rrCUS3zv0GiInQFP6hRfHzSAcavY,45207
|
26
25
|
mdbq/other/porxy.py,sha256=UHfgEyXugogvXgsG68a7QouUCKaohTKKkI4RN-kYSdQ,4961
|
27
26
|
mdbq/other/pov_city.py,sha256=AEOmCOzOwyjHi9LLZWPKi6DUuSC-_M163664I52u9qw,21050
|
28
27
|
mdbq/other/ua_sj.py,sha256=JuVYzc_5QZ9s_oQSrTHVKkQv4S_7-CWx4oIKOARn_9U,22178
|
@@ -31,10 +30,10 @@ mdbq/pbix/pbix_refresh.py,sha256=JUjKW3bNEyoMVfVfo77UhguvS5AWkixvVhDbw4_MHco,239
|
|
31
30
|
mdbq/pbix/refresh_all.py,sha256=OBT9EewSZ0aRS9vL_FflVn74d4l2G00wzHiikCC4TC0,5926
|
32
31
|
mdbq/pbix/refresh_all_old.py,sha256=_pq3WSQ728GPtEG5pfsZI2uTJhU8D6ra-htIk1JXYzw,7192
|
33
32
|
mdbq/redis/__init__.py,sha256=YtgBlVSMDphtpwYX248wGge1x-Ex_mMufz4-8W0XRmA,12
|
34
|
-
mdbq/redis/getredis.py,sha256=
|
33
|
+
mdbq/redis/getredis.py,sha256=IoS40CaOfcWHe74iFVvlygvy-duNcO-CoYCbyc_7qdQ,25916
|
35
34
|
mdbq/spider/__init__.py,sha256=RBMFXGy_jd1HXZhngB2T2XTvJqki8P_Fr-pBcwijnew,18
|
36
|
-
mdbq/spider/aikucun.py,sha256=
|
37
|
-
mdbq-3.7.
|
38
|
-
mdbq-3.7.
|
39
|
-
mdbq-3.7.
|
40
|
-
mdbq-3.7.
|
35
|
+
mdbq/spider/aikucun.py,sha256=yDeuMLClM2Dp8pFqfRypAvILb4kT4sB-CSR9HF8_Nao,22328
|
36
|
+
mdbq-3.7.16.dist-info/METADATA,sha256=C4hGq3pI11My5xNZOCOaapmirsLkXiF8YbtPnb_ta78,244
|
37
|
+
mdbq-3.7.16.dist-info/WHEEL,sha256=eOLhNAGa2EW3wWl_TU484h7q1UNgy0JXjjoqKoxAAQc,92
|
38
|
+
mdbq-3.7.16.dist-info/top_level.txt,sha256=2FQ-uLnCSB-OwFiWntzmwosW3X2Xqsg0ewh1axsaylA,5
|
39
|
+
mdbq-3.7.16.dist-info/RECORD,,
|