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
ac59430d
Commit
ac59430d
authored
Dec 03, 2025
by
邱阿朋
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(gui): 修正价格类型判断及日志推送
- 修正价格判断条件,支持int和float两种类型 - 推送消息完成后增加日志打印提示 - 优化代码可读性,规范异常数据处理流程
parent
478b94ef
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
price_gui.py
price_gui.py
+3
-1
No files found.
price_gui.py
View file @
ac59430d
...
@@ -176,7 +176,7 @@ class AmazonPriceScraper:
...
@@ -176,7 +176,7 @@ class AmazonPriceScraper:
country
=
self
.
country_var
.
get
()
country
=
self
.
country_var
.
get
()
for
_
,
item_row
in
data
.
iterrows
():
for
_
,
item_row
in
data
.
iterrows
():
price
=
item_row
.
get
(
'Price'
,
0
)
price
=
item_row
.
get
(
'Price'
,
0
)
if
not
isinstance
(
price
,
float
)
or
not
isinstance
(
price
,
int
):
if
not
isinstance
(
price
,
(
int
,
float
)
):
continue
continue
push_data
=
{
push_data
=
{
...
@@ -188,6 +188,8 @@ class AmazonPriceScraper:
...
@@ -188,6 +188,8 @@ class AmazonPriceScraper:
client
.
close
()
client
.
close
()
self
.
log
(
"推送消息完成"
)
def
start_scraping
(
self
):
def
start_scraping
(
self
):
if
not
self
.
asins
:
if
not
self
.
asins
:
self
.
log
(
"请先选择包含ASIN的Excel文件"
)
self
.
log
(
"请先选择包含ASIN的Excel文件"
)
...
...
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