qrpa 1.0.81__py3-none-any.whl → 1.0.82__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.

Potentially problematic release.


This version of qrpa might be problematic. Click here for more details.

qrpa/shein_lib.py CHANGED
@@ -629,6 +629,19 @@ class SheinLib:
629
629
  log(f'正在获取 {self.store_name} 最近一个月出库金额: {last_item["totalCustomerAmount"]}')
630
630
  return last_item['totalCustomerAmount']
631
631
 
632
+ def query_attribute_multi(self, attribute_id_list):
633
+ url = "https://sso.geiwohuo.com/spmp-api-prefix/spmp/attribute/query_attribute_multi"
634
+ payload = {
635
+ "attribute_id_list": attribute_id_list,
636
+ }
637
+ response_text = fetch(self.web_page, url, payload)
638
+ error_code = response_text.get('code')
639
+ if str(error_code) != '0':
640
+ raise send_exception(json.dumps(response_text, ensure_ascii=False))
641
+ info = response_text.get('info')
642
+ lst = info.get('data', {})
643
+ return lst
644
+
632
645
  def get_product_attr(self, spu, attr_name):
633
646
  try:
634
647
  product_detail = self.get_product_detail(spu)
@@ -706,6 +719,14 @@ class SheinLib:
706
719
  if str(error_code) != '0':
707
720
  raise send_exception(json.dumps(response_text, ensure_ascii=False))
708
721
  info = response_text.get('info')
722
+
723
+ # 获取 area_attribute_id
724
+ sample_sku_back_size = info.get('sample_sku_back_size', None)
725
+ if sample_sku_back_size is not None:
726
+ area_attribute_ids = [item['area_attribute_id'] for item in sample_sku_back_size.get('area_info_list', [])]
727
+ attribute_multi = self.query_attribute_multi(area_attribute_ids)
728
+ info["attribute_multi"] = attribute_multi
729
+
709
730
  write_dict_to_file(cache_file, info)
710
731
  return info
711
732
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: qrpa
3
- Version: 1.0.81
3
+ Version: 1.0.82
4
4
  Summary: qsir's rpa library
5
5
  Author: QSir
6
6
  Author-email: QSir <1171725650@qq.com>
@@ -11,7 +11,7 @@ qrpa/fun_web.py,sha256=Ep2ddMwJix_KNpCiHEjSo7tWu-g55Nlu1QtOXJf6iZw,6531
11
11
  qrpa/fun_win.py,sha256=-LnTeocdTt72NVH6VgLdpAT9_C5oV9okeudXG6CftMA,8034
12
12
  qrpa/shein_daily_report_model.py,sha256=H8oZmIN5Pyqe306W1_xuz87lOqLQ_LI5RjXbaxDkIzE,12589
13
13
  qrpa/shein_excel.py,sha256=1F9QMMsaihDfwr0ajSSQdXksBCjuKSPwMynfP7Jlkso,124825
14
- qrpa/shein_lib.py,sha256=_HFWyBpqKKiL7Wm4FlQaJjWroRLb2veU0Ei3Z4uZw-g,126369
14
+ qrpa/shein_lib.py,sha256=DULi8q93YZAQM9JcRhAzU_x3jph5XALifTtjs8wR_rQ,127342
15
15
  qrpa/shein_mysql.py,sha256=SrgBYPNWaKHIpD5Q7hqz3GWvytXO8u9SPvKxJvLwYsI,2720
16
16
  qrpa/shein_sqlite.py,sha256=ZQwD0Gz81q9WY7tY2HMEYvSF9r3N_G_Aur3bYfST9WY,5707
17
17
  qrpa/shein_ziniao.py,sha256=3PvoRK-J81q5vhNXdhJ_OODExXPrPfJzTgYBH1S4rxM,18703
@@ -24,7 +24,7 @@ qrpa/wxwork.py,sha256=gIytG19DZ5g7Tsl0-W3EbjfSnpIqZw-ua24gcB78YEg,11264
24
24
  qrpa/mysql_module/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
25
25
  qrpa/mysql_module/shein_product_model.py,sha256=qViI_Ik3SkXXxqJ1nXjimvfB_a5uiwW9RXL0fOreBao,18880
26
26
  qrpa/mysql_module/shein_return_order_model.py,sha256=Zt-bGOH_kCDbakW7uaTmqqo_qTT8v424yidcYSfWvWM,26562
27
- qrpa-1.0.81.dist-info/METADATA,sha256=PU6_lXcROdo-69M6A7LjDB5rD7taT_nsadKdmWT54Bk,231
28
- qrpa-1.0.81.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
29
- qrpa-1.0.81.dist-info/top_level.txt,sha256=F6T5igi0fhXDucPPUbmmSC0qFCDEsH5eVijfVF48OFU,5
30
- qrpa-1.0.81.dist-info/RECORD,,
27
+ qrpa-1.0.82.dist-info/METADATA,sha256=9X9XhzlvYOeFklMhLvVH9mZrFgvt28p5pdQZFR95T_w,231
28
+ qrpa-1.0.82.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
29
+ qrpa-1.0.82.dist-info/top_level.txt,sha256=F6T5igi0fhXDucPPUbmmSC0qFCDEsH5eVijfVF48OFU,5
30
+ qrpa-1.0.82.dist-info/RECORD,,
File without changes