Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
amazon_reports
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
common
amazon_reports
Commits
9dc40213
Commit
9dc40213
authored
Jul 24, 2025
by
邱阿朋
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(vc): 支持日本站广告成本分析
- 添加日本站广告域名切换逻辑 - 更新域名切换函数以支持广告页面 - 解除日本站的注释- 更新测试用例和SPA计算示例
parent
92a406c2
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
6 deletions
+14
-6
domain.py
app/helper/domain.py
+6
-0
advert_cost.py
app/vc/advert_cost.py
+3
-1
super_gui.py
super_gui.py
+1
-1
test.py
test.py
+4
-4
No files found.
app/helper/domain.py
View file @
9dc40213
...
...
@@ -22,6 +22,12 @@ def switch_domain(country):
return
domain
def
switch_ad_domain
(
country
):
domain
=
"https://advertising.amazon.com/"
if
country
==
"JP"
:
domain
=
"https://advertising.amazon.co.jp/"
return
domain
def
domain_page
(
logger
,
page
,
country
):
url
=
switch_domain
(
country
)
...
...
app/vc/advert_cost.py
View file @
9dc40213
...
...
@@ -75,7 +75,9 @@ class AdvertCost(AutoInterface):
self
.
logger
.
debug
(
f
"开始处理小组:{name}"
)
entity_id
=
info
[
'id'
][
1
:]
self
.
page
.
get
(
f
"https://advertising.amazon.com/cm/products?entityId=ENTITY{entity_id}"
)
host
=
domain
.
switch_ad_domain
(
self
.
country
)
self
.
page
.
get
(
f
"{host}cm/products?entityId=ENTITY{entity_id}"
)
# 判断是否正常
target_text
=
"There’s an issue with your payment method and your campaigns have stopped delivering."
...
...
super_gui.py
View file @
9dc40213
...
...
@@ -83,7 +83,7 @@ class VCManagerGUI(ttk.Window):
countries
=
[
(
"美国"
,
"US"
),
# ("英国", "UK"),
#
("日本", "JP"),
(
"日本"
,
"JP"
),
# ("法国", "FR"),
# ("德国", "DE"),
# ("加拿大", "CA"),
...
...
test.py
View file @
9dc40213
...
...
@@ -70,15 +70,15 @@ def calculate_totals(file_path):
def
calculate_spa
():
# 使用示例
file_path
=
'2025-0
6-13-16-52
_US_spa.xlsx'
# 替换为你的Excel文件路径
file_path
=
'2025-0
7-23-14-41
_US_spa.xlsx'
# 替换为你的Excel文件路径
total_amount
,
total_rows
=
calculate_totals
(
file_path
)
def
sap
():
logger
=
ConsoleLog
()
page
=
ChromiumPage
()
spa
=
Spa
(
logger
,
page
,
"U
S"
,
"VECELO
"
)
spa
.
result_file_name
=
"2025-0
6-13-16-52_US
_spa.xlsx"
spa
=
Spa
(
logger
,
page
,
"U
K"
,
"UK-VC
"
)
spa
.
result_file_name
=
"2025-0
7-21-15-29_UK
_spa.xlsx"
spa
.
push_data_queue
()
sap
()
\ No newline at end of file
calculate_spa
()
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment