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
8057d8ef
Commit
8057d8ef
authored
Oct 22, 2024
by
邱阿朋
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
spa数据查询
parent
f7f89a93
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
returns.py
returns.py
+5
-3
No files found.
returns.py
View file @
8057d8ef
...
...
@@ -7,7 +7,7 @@ import pandas as pd
from
DrissionPage
import
ChromiumPage
from
DrissionPage.errors
import
PageDisconnectedError
from
helper
import
helper
,
excel
from
helper
import
helper
,
excel
,
file
email
=
None
password
=
None
...
...
@@ -64,7 +64,8 @@ def export_list_read_data():
# 访问网页
open_url
(
"https://vendorcentral.amazon.com/hz/vendor/members/returns?ref_=vc_xx_subNav"
)
# 导出退货单
page
.
ele
(
"#file-download-button"
)
.
click
.
to_download
()
.
wait
()
page
.
ele
(
"#file-download-button"
)
.
click
.
to_download
()
file
.
wait_for_downloads
(
file_name
)
return
pd
.
read_excel
(
file_name
,
engine
=
'xlrd'
)
...
...
@@ -74,7 +75,8 @@ def export_item_read_data(return_id):
if
not
os
.
path
.
isfile
(
file_name
):
# 打开退回详情下载明细
open_url
(
f
"https://vendorcentral.amazon.com/katalmonsapp/vendor/members/returns/{return_id}"
)
page
.
ele
(
"#file-download-button"
)
.
click
.
to_download
(
rename
=
file_name
)
.
wait
()
page
.
ele
(
"#file-download-button"
)
.
click
.
to_download
(
rename
=
file_name
)
file
.
wait_for_downloads
(
file_name
)
# 读取回退商品详情
return
pd
.
read_excel
(
file_name
,
engine
=
'xlrd'
)
...
...
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