mirror of
https://github.com/NaiboWang/EasySpider.git
synced 2026-11-03 23:24:46 +08:00
Change keyboard module
This commit is contained in:
@@ -1511,7 +1511,7 @@ if __name__ == '__main__':
|
||||
time.sleep(3)
|
||||
print("\n\n----------------------------------")
|
||||
print("正在运行任务,按键盘p键可暂停任务的执行以便手工操作浏览器如输入验证码;如果想恢复任务的执行,请再次按p键。")
|
||||
print("Running task, long press 'p' to pause the task for manual operation of the browser such as entering the verification code; If you want to resume the execution of the task, please long press 'p' again.")
|
||||
print("Running task, press 'p' to pause the task for manual operation of the browser such as entering the verification code; If you want to resume the execution of the task, please press 'p' again.")
|
||||
print("----------------------------------\n\n")
|
||||
# 使用监听器监听键盘输入
|
||||
with Listener(on_press=on_press, on_release=on_release_creator(event)) as listener:
|
||||
|
||||
@@ -1514,8 +1514,12 @@ if __name__ == '__main__':
|
||||
print("Running task, press 'p' to pause the task for manual operation of the browser such as entering the verification code; If you want to resume the execution of the task, please press 'p' again.")
|
||||
print("----------------------------------\n\n")
|
||||
# 使用监听器监听键盘输入
|
||||
with Listener(on_press=on_press, on_release=on_release_creator(event)) as listener:
|
||||
listener.join()
|
||||
try:
|
||||
with Listener(on_press=on_press, on_release=on_release_creator(event)) as listener:
|
||||
listener.join()
|
||||
except:
|
||||
print("您的操作系统不支持暂停功能。")
|
||||
print("Your operating system does not support the pause function.")
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user