mdbq 1.8.4__tar.gz → 1.8.6__tar.gz

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.
Files changed (46) hide show
  1. {mdbq-1.8.4 → mdbq-1.8.6}/PKG-INFO +1 -1
  2. {mdbq-1.8.4 → mdbq-1.8.6}/mdbq/aggregation/aggregation.py +12 -7
  3. {mdbq-1.8.4 → mdbq-1.8.6}/mdbq/other/sku_picture.py +1 -0
  4. {mdbq-1.8.4 → mdbq-1.8.6}/mdbq.egg-info/PKG-INFO +1 -1
  5. {mdbq-1.8.4 → mdbq-1.8.6}/setup.py +1 -1
  6. {mdbq-1.8.4 → mdbq-1.8.6}/README.txt +0 -0
  7. {mdbq-1.8.4 → mdbq-1.8.6}/mdbq/__init__.py +0 -0
  8. {mdbq-1.8.4 → mdbq-1.8.6}/mdbq/__version__.py +0 -0
  9. {mdbq-1.8.4 → mdbq-1.8.6}/mdbq/aggregation/__init__.py +0 -0
  10. {mdbq-1.8.4 → mdbq-1.8.6}/mdbq/aggregation/df_types.py +0 -0
  11. {mdbq-1.8.4 → mdbq-1.8.6}/mdbq/aggregation/mysql_types.py +0 -0
  12. {mdbq-1.8.4 → mdbq-1.8.6}/mdbq/aggregation/optimize_data.py +0 -0
  13. {mdbq-1.8.4 → mdbq-1.8.6}/mdbq/aggregation/query_data.py +0 -0
  14. {mdbq-1.8.4 → mdbq-1.8.6}/mdbq/bdup/__init__.py +0 -0
  15. {mdbq-1.8.4 → mdbq-1.8.6}/mdbq/bdup/bdup.py +0 -0
  16. {mdbq-1.8.4 → mdbq-1.8.6}/mdbq/clean/__init__.py +0 -0
  17. {mdbq-1.8.4 → mdbq-1.8.6}/mdbq/clean/data_clean.py +0 -0
  18. {mdbq-1.8.4 → mdbq-1.8.6}/mdbq/company/__init__.py +0 -0
  19. {mdbq-1.8.4 → mdbq-1.8.6}/mdbq/company/copysh.py +0 -0
  20. {mdbq-1.8.4 → mdbq-1.8.6}/mdbq/config/__init__.py +0 -0
  21. {mdbq-1.8.4 → mdbq-1.8.6}/mdbq/config/get_myconf.py +0 -0
  22. {mdbq-1.8.4 → mdbq-1.8.6}/mdbq/config/products.py +0 -0
  23. {mdbq-1.8.4 → mdbq-1.8.6}/mdbq/config/set_support.py +0 -0
  24. {mdbq-1.8.4 → mdbq-1.8.6}/mdbq/config/update_conf.py +0 -0
  25. {mdbq-1.8.4 → mdbq-1.8.6}/mdbq/dataframe/__init__.py +0 -0
  26. {mdbq-1.8.4 → mdbq-1.8.6}/mdbq/dataframe/converter.py +0 -0
  27. {mdbq-1.8.4 → mdbq-1.8.6}/mdbq/log/__init__.py +0 -0
  28. {mdbq-1.8.4 → mdbq-1.8.6}/mdbq/log/mylogger.py +0 -0
  29. {mdbq-1.8.4 → mdbq-1.8.6}/mdbq/mongo/__init__.py +0 -0
  30. {mdbq-1.8.4 → mdbq-1.8.6}/mdbq/mongo/mongo.py +0 -0
  31. {mdbq-1.8.4 → mdbq-1.8.6}/mdbq/mysql/__init__.py +0 -0
  32. {mdbq-1.8.4 → mdbq-1.8.6}/mdbq/mysql/mysql.py +0 -0
  33. {mdbq-1.8.4 → mdbq-1.8.6}/mdbq/mysql/s_query.py +0 -0
  34. {mdbq-1.8.4 → mdbq-1.8.6}/mdbq/mysql/year_month_day.py +0 -0
  35. {mdbq-1.8.4 → mdbq-1.8.6}/mdbq/other/__init__.py +0 -0
  36. {mdbq-1.8.4 → mdbq-1.8.6}/mdbq/other/porxy.py +0 -0
  37. {mdbq-1.8.4 → mdbq-1.8.6}/mdbq/other/pov_city.py +0 -0
  38. {mdbq-1.8.4 → mdbq-1.8.6}/mdbq/other/ua_sj.py +0 -0
  39. {mdbq-1.8.4 → mdbq-1.8.6}/mdbq/pbix/__init__.py +0 -0
  40. {mdbq-1.8.4 → mdbq-1.8.6}/mdbq/pbix/pbix_refresh.py +0 -0
  41. {mdbq-1.8.4 → mdbq-1.8.6}/mdbq/pbix/refresh_all.py +0 -0
  42. {mdbq-1.8.4 → mdbq-1.8.6}/mdbq/spider/__init__.py +0 -0
  43. {mdbq-1.8.4 → mdbq-1.8.6}/mdbq.egg-info/SOURCES.txt +0 -0
  44. {mdbq-1.8.4 → mdbq-1.8.6}/mdbq.egg-info/dependency_links.txt +0 -0
  45. {mdbq-1.8.4 → mdbq-1.8.6}/mdbq.egg-info/top_level.txt +0 -0
  46. {mdbq-1.8.4 → mdbq-1.8.6}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: mdbq
3
- Version: 1.8.4
3
+ Version: 1.8.6
4
4
  Home-page: https://pypi.org/project/mdbsql
5
5
  Author: xigua,
6
6
  Author-email: 2587125111@qq.com
@@ -452,14 +452,19 @@ class DatabaseUpdate:
452
452
  collection_name = 'spu_商品明细'
453
453
  elif name.endswith('.xlsx') and '搜索分析-排名定位-商品词下排名' in name:
454
454
  # 京东商品词下排名
455
- df = pd.read_excel(os.path.join(root, name), header=0, engine='openpyxl')
456
- if len(df) == 0:
457
- print(f'{name} 报表数据为空')
455
+ try:
456
+ df = pd.read_excel(os.path.join(root, name), header=0, engine='openpyxl')
457
+ if len(df) == 0:
458
+ print(f'{name} 报表数据为空')
459
+ continue
460
+ df.rename(columns={'商品的ID': 'skuid'}, inplace=True)
461
+ for col in ['词人气', '搜索点击率']:
462
+ if col in df.columns.tolist():
463
+ df[col] = df[col].apply(lambda x: round(x, 6) if x else x)
464
+ except Exception as e:
465
+ print(e)
466
+ print(name, '报错')
458
467
  continue
459
- df.rename(columns={'商品的ID': 'skuid'}, inplace=True)
460
- for col in ['词人气', '搜索点击率']:
461
- if col in df.columns.tolist():
462
- df[col] = df[col].apply(lambda x: round(x, 6) if x else x)
463
468
  elif name.endswith('.xlsx') and '搜索分析-排名定位-商品排名' in name:
464
469
  # 京东商品排名
465
470
  date_in = re.findall(r'(\d{4}-\d{2}-\d{2})-搜索', str(name))[0]
@@ -708,6 +708,7 @@ def main(service_name, database):
708
708
  def main2(service_name, database):
709
709
  """ 从数据库读取数据,并下载图片到本地 """
710
710
  d = DownloadPicture(service_name=service_name)
711
+ d.save_path = '/Users/xigua/Downloads/sku图片链接' # 下载图片到本地时的存储位置
711
712
  d.get_df_from_service()
712
713
  d.download_data()
713
714
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: mdbq
3
- Version: 1.8.4
3
+ Version: 1.8.6
4
4
  Home-page: https://pypi.org/project/mdbsql
5
5
  Author: xigua,
6
6
  Author-email: 2587125111@qq.com
@@ -3,7 +3,7 @@
3
3
  from setuptools import setup, find_packages
4
4
 
5
5
  setup(name='mdbq',
6
- version='1.8.4',
6
+ version='1.8.6',
7
7
  author='xigua, ',
8
8
  author_email="2587125111@qq.com",
9
9
  url='https://pypi.org/project/mdbsql',
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes