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
1f0db93b
Commit
1f0db93b
authored
Nov 01, 2024
by
邱阿朋
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化
parent
8d6344e0
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
5 deletions
+5
-5
spa_search.exe
dist/spa_search.exe
+0
-0
refund.py
src/refund.py
+1
-1
return_goods.py
src/return_goods.py
+1
-1
spa_search.py
src/spa_search.py
+3
-3
No files found.
dist/spa_search.exe
View file @
1f0db93b
No preview for this file type
src/refund.py
View file @
1f0db93b
...
...
@@ -89,7 +89,7 @@ def export_details_read_data(invoice_number):
page_get
(
full_url
)
# 读取详情内容
file_name
=
f
"
invoices
\\
{invoice_number}.csv"
file_name
=
f
"
refund
\\
{invoice_number}.csv"
if
os
.
path
.
isfile
(
file_name
):
return
pd
.
read_csv
(
file_name
)
...
...
src/return_goods.py
View file @
1f0db93b
...
...
@@ -43,7 +43,7 @@ def export_list_read_data():
def
export_item_read_data
(
return_id
):
file_name
=
f
"returns
\\
{return_id}.xls"
file_name
=
f
"return
_good
s
\\
{return_id}.xls"
if
not
os
.
path
.
isfile
(
file_name
):
while
True
:
try
:
...
...
src/spa_search.py
View file @
1f0db93b
...
...
@@ -69,7 +69,7 @@ def get_report_table_html(invoice_id):
def
export_item_read_data
(
invoice_id
):
file_name
=
f
"
coop
\\
{invoice_id}.xlsx"
file_name
=
f
"
spa
\\
{invoice_id}.xlsx"
if
os
.
path
.
isfile
(
file_name
):
df
=
pd
.
read_excel
(
file_name
)
return
df
...
...
@@ -85,7 +85,7 @@ def export_item_read_data(invoice_id):
query_params
=
parse_qs
(
parsed_url
.
query
)
# 提取 filename 参数
filename
=
query_params
.
get
(
'fileName'
,
[
'未找到文件名'
])[
0
]
report_file_tmp_dir
=
f
"
coop
\\
{invoice_id}
\\
{filename}
\\
"
report_file_tmp_dir
=
f
"
spa
\\
{invoice_id}
\\
{filename}
\\
"
host
=
domain
.
switch_domain
(
country
)
page
.
download
(
host
+
link
,
report_file_tmp_dir
,
show_msg
=
False
)
...
...
@@ -105,7 +105,7 @@ def export_item_read_data(invoice_id):
data
=
df
[
df
[
'Asin'
]
.
notna
()]
excel
.
save_xls
(
data
,
file_name
)
shutil
.
rmtree
(
f
"
coop
\\
{invoice_id}"
)
shutil
.
rmtree
(
f
"
spa
\\
{invoice_id}"
)
return
pd
.
read_excel
(
file_name
)
except
ValueError
:
pass
...
...
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