Commit 3d4012f4 authored by 邱阿朋's avatar 邱阿朋

优化

parent fbef146a
......@@ -28,17 +28,22 @@ page.set.download_path(download_path)
# 忽略 openpyxl 样式警告
warnings.filterwarnings("ignore", category=UserWarning, module="openpyxl")
while True:
time.sleep(1)
title = page.title
if title == "Amazon Sign-In":
print("请登录账号")
continue
try:
page.ele("#cvf-submit-otp-button-announce")
print("请输入验证码")
except ElementNotFoundError:
break
def page_get(url):
host = domain.switch_domain(country)
full_url = host + url
page.get(full_url, timeout=3)
while True:
time.sleep(1)
title = page.title
if title == "Amazon Sign-In":
print("请登录账号")
continue
try:
page.ele("#cvf-submit-otp-button-announce")
print("请输入验证码")
except ElementNotFoundError:
break
def export_list_read_data():
......
......@@ -22,17 +22,22 @@ helper.make_dir(download_path)
# 设置下载路径,确保在打开浏览器前设置
page.set.download_path(download_path)
while True:
time.sleep(1)
title = page.title
if title == "Amazon Sign-In":
print("请登录账号")
continue
try:
page.ele("#cvf-submit-otp-button-announce")
print("请输入验证码")
except ElementNotFoundError:
break
def page_get(url):
host = domain.switch_domain(country)
full_url = host + url
page.get(full_url, timeout=3)
while True:
time.sleep(1)
title = page.title
if title == "Amazon Sign-In":
print("请登录账号")
continue
try:
page.ele("#cvf-submit-otp-button-announce")
print("请输入验证码")
except ElementNotFoundError:
break
def sku_relations():
......
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