mirror of
https://github.com/NaiboWang/EasySpider.git
synced 2025-04-23 05:54:26 +08:00
Linux ssl verification
This commit is contained in:
parent
3bb06403d4
commit
9a2311b820
@ -1370,16 +1370,19 @@ if __name__ == '__main__':
|
||||
driver_path = os.path.join(
|
||||
os.getcwd(), "EasySpider/resources/app/chrome_win32/chromedriver_win32.exe")
|
||||
option.add_extension("EasySpider/resources/app/XPathHelper.crx")
|
||||
options.add_extension("EasySpider/resources/app/XPathHelper.crx")
|
||||
elif sys.platform == "win32" and platform.architecture()[0] == "64bit":
|
||||
options.binary_location = os.path.join(
|
||||
os.getcwd(), "EasySpider/resources/app/chrome_win64/chrome.exe")
|
||||
driver_path = os.path.join(
|
||||
os.getcwd(), "EasySpider/resources/app/chrome_win64/chromedriver_win64.exe")
|
||||
option.add_extension("EasySpider/resources/app/XPathHelper.crx")
|
||||
options.add_extension("EasySpider/resources/app/XPathHelper.crx")
|
||||
elif sys.platform == "linux" and platform.architecture()[0] == "64bit":
|
||||
options.binary_location = "EasySpider/resources/app/chrome_linux64/chrome"
|
||||
driver_path = "EasySpider/resources/app/chrome_linux64/chromedriver_linux64"
|
||||
option.add_extension("EasySpider/resources/app/XPathHelper.crx")
|
||||
options.add_extension("EasySpider/resources/app/XPathHelper.crx")
|
||||
else:
|
||||
print("Unsupported platform")
|
||||
sys.exit()
|
||||
@ -1499,7 +1502,7 @@ if __name__ == '__main__':
|
||||
options=options, chrome_options=option, executable_path=driver_path)
|
||||
elif cloudflare == 1:
|
||||
browser_t = MyUCChrome(
|
||||
options=options, chrome_options=option, executable_path=driver_path)
|
||||
options=options, chrome_options=option, driver_executable_path=driver_path)
|
||||
print("Pass Cloudflare Mode")
|
||||
print("过Cloudflare验证模式")
|
||||
event = Event()
|
||||
@ -1529,8 +1532,9 @@ if __name__ == '__main__':
|
||||
with Listener(on_press=on_press_creator(press_time, event), on_release=on_release_creator(event, press_time)) as listener:
|
||||
listener.join()
|
||||
except:
|
||||
print("您的操作系统不支持暂停功能。")
|
||||
print("Your operating system does not support the pause function.")
|
||||
pass
|
||||
# print("您的操作系统不支持暂停功能。")
|
||||
# print("Your operating system does not support the pause function.")
|
||||
|
||||
|
||||
# print("线程长度:", len(threads) )
|
||||
|
@ -12,7 +12,7 @@ from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
|
||||
from selenium.webdriver.support.ui import Select
|
||||
from selenium.webdriver import ActionChains
|
||||
from selenium.webdriver.common.by import By
|
||||
import undetected_chromedriver as uc
|
||||
import undetected_chromedriver_ES as uc
|
||||
desired_capabilities = DesiredCapabilities.CHROME
|
||||
desired_capabilities["pageLoadStrategy"] = "none"
|
||||
|
||||
|
@ -34,16 +34,16 @@ def on_press_creator(press_time, event):
|
||||
press_time["is_pressed"] = True
|
||||
else: # 按下p键时,判断按下p键的时间是否超过2.5秒
|
||||
duration = time.time() - press_time["duration"]
|
||||
if duration > 2.5:
|
||||
if duration > 2:
|
||||
if event._flag == False:
|
||||
print("任务执行中,按p键暂停执行。")
|
||||
print("Task is running, press 'p' to pause.")
|
||||
print("任务执行中,长按p键暂停执行。")
|
||||
print("Task is running, long press 'p' to pause.")
|
||||
# 设置Event的值为True,使得线程b可以继续执行
|
||||
event.set()
|
||||
else:
|
||||
# 设置Event的值为False,使得线程b暂停执行
|
||||
print("任务已暂停,按p键继续执行...")
|
||||
print("Task paused, press 'p' to continue...")
|
||||
print("任务已暂停,长按p键继续执行...")
|
||||
print("Task paused, long press 'p' to continue...")
|
||||
event.clear()
|
||||
press_time["duration"] = time.time()
|
||||
press_time["is_pressed"] = False
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
.temp_to_pub/EasySpider_windows_x64/tasks/123.json
Normal file
1
.temp_to_pub/EasySpider_windows_x64/tasks/123.json
Normal file
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user