提交货源图片和相似ASIN优化
This commit is contained in:
@@ -9,7 +9,7 @@ from datetime import datetime
|
||||
from DrissionPage import Chromium, ChromiumOptions
|
||||
from collections import defaultdict
|
||||
|
||||
from config import base_dir
|
||||
from config import base_dir,debug
|
||||
from amazon.tool import get_shop_info,show_notification
|
||||
|
||||
|
||||
@@ -46,7 +46,8 @@ class ChromeAmzoneBase:
|
||||
杀死当前谷歌浏览器进程,并使用 drissionpage 启动谷歌浏览器,使用系统安装的浏览器默认用户文件夹
|
||||
"""
|
||||
print("正在关闭现有的chromium浏览器进程...")
|
||||
os.system('taskkill /f /t /im chrome.exe')
|
||||
if not debug:
|
||||
os.system('taskkill /f /t /im chrome.exe')
|
||||
time.sleep(2)
|
||||
|
||||
print("正在启动chromium浏览器...")
|
||||
@@ -70,8 +71,8 @@ class ChromeAmzoneBase:
|
||||
"""
|
||||
try:
|
||||
timestamp = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
|
||||
if level == "ERROR":
|
||||
show_notification(message, "error")
|
||||
# if level == "ERROR":
|
||||
# show_notification(message, "error")
|
||||
print(f"[{timestamp}] [{self.mark_name}] [{level}] {message}")
|
||||
except Exception as e:
|
||||
print(f"输出出错,{e}")
|
||||
|
||||
Reference in New Issue
Block a user