From 3bd67ee5edcc81d300a7d7cf001e51f18a0faded Mon Sep 17 00:00:00 2001 From: naibo Date: Wed, 2 Aug 2023 11:50:18 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=B0=83=E8=AF=95=E6=B3=A8?= =?UTF-8?q?=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ElectronJS/tasks/204.json | 1 + ExecuteStage/.vscode/launch.json | 2 +- ExecuteStage/easyspider_executestage.py | 3 +++ 3 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 ElectronJS/tasks/204.json diff --git a/ElectronJS/tasks/204.json b/ElectronJS/tasks/204.json new file mode 100644 index 0000000..f902e83 --- /dev/null +++ b/ElectronJS/tasks/204.json @@ -0,0 +1 @@ +{"id":204,"name":"官方视频-锤子商城","url":"https://www.smartisan.com/pr/videos/r2-id","links":"https://www.smartisan.com/pr/videos/r2-id","create_time":"8/1/2023, 7:44:06 PM","update_time":"8/1/2023, 8:06:22 PM","version":"0.5.0","saveThreshold":10,"cloudflare":0,"environment":0,"maxViewLength":15,"recordLog":1,"outputFormat":"xlsx","saveName":"current_time","inputExcel":"","startFromExit":0,"containJudge":false,"desc":"https://www.smartisan.com/pr/videos/r2-id","inputParameters":[{"id":0,"name":"urlList_0","nodeId":1,"nodeName":"打开网页","value":"https://www.smartisan.com/pr/videos/r2-id","desc":"要采集的网址列表,多行以\\n分开","type":"text","exampleValue":"https://www.smartisan.com/pr/videos/r2-id"}],"outputParameters":[{"id":0,"name":"自定义参数_1","desc":"","type":"text","recordASField":1,"exampleValue":"自定义值"}],"graph":[{"index":0,"id":0,"parentId":0,"type":-1,"option":0,"title":"root","sequence":[1,2],"parameters":{"history":1,"tabIndex":0,"useLoop":false,"xpath":"","iframe":false,"wait":0,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0},"isInLoop":false},{"id":1,"index":1,"parentId":0,"type":0,"option":1,"title":"打开网页","sequence":[],"isInLoop":false,"position":0,"parameters":{"useLoop":false,"xpath":"","wait":0,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"url":"https://www.smartisan.com/pr/videos/r2-id","links":"https://www.smartisan.com/pr/videos/r2-id","maxWaitTime":10,"scrollType":0,"scrollCount":1,"scrollWaitTime":1,"cookies":""}},{"id":2,"index":2,"parentId":0,"type":0,"option":3,"title":"提取数据","sequence":[],"isInLoop":false,"position":1,"parameters":{"history":1,"tabIndex":0,"useLoop":false,"xpath":"","iframe":false,"wait":0,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"clear":0,"paras":[{"nodeType":0,"contentType":9,"relative":false,"name":"自定义参数_1","desc":"","extractType":0,"relativeXPath":"//video[@class=\"vjs-tech\"]","recordASField":1,"allXPaths":[],"exampleValues":[{"num":0,"value":"自定义值"}],"default":"","beforeJS":"","beforeJSWaitTime":0,"JS":"return arguments[0].getAttribute(\"src\")","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0,"paraType":"text"}]}}]} \ No newline at end of file diff --git a/ExecuteStage/.vscode/launch.json b/ExecuteStage/.vscode/launch.json index ce6f3fc..0b8279b 100644 --- a/ExecuteStage/.vscode/launch.json +++ b/ExecuteStage/.vscode/launch.json @@ -12,7 +12,7 @@ "justMyCode": false, // "args": ["--id", "[7]", "--read_type", "remote", "--headless", "0"] // "args": ["--id", "[9]", "--read_type", "remote", "--headless", "0", "--saved_file_name", "YOUTUBE"] - "args": ["--id", "[28]", "--headless", "0", "--user_data", "0", "--keyboard", "0"] + "args": ["--id", "[20]", "--headless", "0", "--user_data", "0", "--keyboard", "0"] } ] } \ No newline at end of file diff --git a/ExecuteStage/easyspider_executestage.py b/ExecuteStage/easyspider_executestage.py index 96314b2..b265d9c 100644 --- a/ExecuteStage/easyspider_executestage.py +++ b/ExecuteStage/easyspider_executestage.py @@ -1746,6 +1746,9 @@ class BrowserThread(Thread): if __name__ == '__main__': # from multiprocessing import freeze_support # freeze_support() # 防止无限死循环多开 + + # 如果需要调试程序,请在命令行参数中加入--keyboard 0 来禁用键盘监听以提升调试速度 + # If you need to debug the program, please add --keyboard 0 in the command line parameters to disable keyboard listening to improve debugging speed config = { "id": [0], "saved_file_name": "",