加入定时任务
This commit is contained in:
@@ -57,7 +57,7 @@ def fetch_and_create_pdf(url):
|
|||||||
"utils", "chromedriver", "chromedriver.exe"
|
"utils", "chromedriver", "chromedriver.exe"
|
||||||
)
|
)
|
||||||
else: # Linux
|
else: # Linux
|
||||||
chrome_driver_path = 'chromedriver' # 使用系统PATH中的chromedriver
|
chrome_driver_path = '/usr/bin/chromedriver' # 使用系统PATH中的chromedriver
|
||||||
|
|
||||||
try:
|
try:
|
||||||
if os.name == 'nt' and not os.path.exists(chrome_driver_path):
|
if os.name == 'nt' and not os.path.exists(chrome_driver_path):
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ def fetch_images(post_url):
|
|||||||
"utils", "chromedriver", "chromedriver.exe"
|
"utils", "chromedriver", "chromedriver.exe"
|
||||||
)
|
)
|
||||||
else: # Linux
|
else: # Linux
|
||||||
chrome_driver_path = 'chromedriver' # 使用系统PATH中的chromedriver
|
chrome_driver_path = '/usr/bin/chromedriver' # 使用系统PATH中的chromedriver
|
||||||
|
|
||||||
# 如果本地没有chromedriver.exe,则使用默认方式
|
# 如果本地没有chromedriver.exe,则使用默认方式
|
||||||
if not os.path.exists(chrome_driver_path):
|
if not os.path.exists(chrome_driver_path):
|
||||||
|
|||||||
Reference in New Issue
Block a user