Commit 9e9ce32b authored by 邱阿朋's avatar 邱阿朋

feat(advert_cost): 支持日本站点数据处理

-增加对日本站点商品数据的处理逻辑
- 更新数据推送格式,增加 country 字段
-优化代码结构,提高可读性和可维护性
parent 9dc40213
......@@ -118,10 +118,17 @@ class AdvertCost(AutoInterface):
for _, item_row in data.iterrows():
asin = item_row.get('Products', '').split("-")[0]
spend = item_row.get('Spend(USD)', ''), # 金额
if self.country == 'JP':
asin = item_row.get('商品', '').split("-")[0]
spend = item_row.get('花费(JPY)', ''), # 金额
push_data = {
'asin': asin, # ASIN
'spend': item_row.get('Spend(USD)', ''), # 金额
'spend': spend, # 金额
'timestamp': int(datetime.now().timestamp()),
'country': self.country,
}
# 推送数据
rabbit.send_message(push_data)
......
......@@ -15,9 +15,9 @@ REM 安装依赖
uv pip install -i https://mirrors.cloud.tencent.com/pypi/simple -r requirements.txt
REM 使用版本号生成 exe 文件
pyinstaller -F -n tool_cmd_%VERSION%.exe tool_cmd.py
REM pyinstaller -F -n tool_cmd_%VERSION%.exe tool_cmd.py
pyinstaller -F -n tool_gui_%VERSION%.exe --noconsole tool_gui.py
pyinstaller -F -n easy_gui.exe --noconsole easy_gui.py
REM pyinstaller -F -n easy_gui.exe --noconsole easy_gui.py
pyinstaller -F -n super_gui_%VERSION%.exe --noconsole super_gui.py
REM 删除生成的 .spec 文件
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment