Commit 8057d8ef authored by 邱阿朋's avatar 邱阿朋

spa数据查询

parent f7f89a93
......@@ -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')
......
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