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

@@ -106,6 +106,8 @@ class SheinProductSku(Base):
106
106
  total_sale_volume = Column(Integer, nullable=True, comment='今日总销量')
107
107
  c7d_sale_cnt = Column(Integer, nullable=True, comment='7日销量')
108
108
  c30d_sale_cnt = Column(Integer, nullable=True, comment='30日销量')
109
+ old_c7d_sale_cnt = Column(Integer, nullable=True, comment='更新前的7日销量')
110
+ old_c30d_sale_cnt = Column(Integer, nullable=True, comment='更新前的30日销量')
109
111
 
110
112
  # 价格成本信息
111
113
  price = Column(DECIMAL(10, 2), nullable=True, comment='价格')
@@ -318,6 +320,10 @@ class SheinProductManager:
318
320
  existing_sku.supplier_sku = sku_data.get('supplierSku')
319
321
  existing_sku.order_cnt = sku_data.get('orderCnt')
320
322
  existing_sku.total_sale_volume = sku_data.get('totalSaleVolume')
323
+ # 保存旧的销量数据
324
+ existing_sku.old_c7d_sale_cnt = existing_sku.c7d_sale_cnt
325
+ existing_sku.old_c30d_sale_cnt = existing_sku.c30d_sale_cnt
326
+ # 更新新的销量数据
321
327
  existing_sku.c7d_sale_cnt = sku_data.get('c7dSaleCnt')
322
328
  existing_sku.c30d_sale_cnt = sku_data.get('c30dSaleCnt')
323
329
  existing_sku.price = sku_data.get('price')
qrpa/temu_lib.py CHANGED
@@ -26,6 +26,8 @@ class TemuLib:
26
26
  """使用 XPath 登录网站"""
27
27
  # 导航到登录页面
28
28
  self.web_page.goto("https://seller.kuajingmaihuo.com/login")
29
+ # fixed
30
+ self.web_page.locator('//div[text()="账号登录"]').click()
29
31
  # 输入用户名
30
32
  self.web_page.locator('//input[@id="usernameId"]').fill("")
31
33
  self.web_page.locator('//input[@id="usernameId"]').fill(username)