Browse Source

MacOS Local

pull/281/head
Naibo Wang 9 months ago
parent
commit
3a127f029a
6 changed files with 14 additions and 8 deletions
  1. +2
    -2
      me
  2. +2
    -2
      .temp_to_pub/EasySpider_MacOS/第一次打开请看这个(包已损坏,无法验证开发者解决方案).txt
  3. BIN
      ElectronJS/EasySpider_en.crx
  4. BIN
      ElectronJS/EasySpider_zh.crx
  5. +2
    -2
      ExecuteStage/.vscode/launch.json
  6. +8
    -2
      ExecuteStage/easyspider_executestage.py

.temp_to_pub/EasySpider_MacOS/First → me View File

@ -29,7 +29,7 @@ You can now open and use the software.
1. Due to MacOS's security policy, the system does not allow EasySpider to run when it is first opened, and it will prompt you to move it to the trash. At this point, you need to click "Cancel".
2. Then open System Settings -> Security & Privacy.
2. Open System Settings -> Security & Privacy.
3. Click "Open Anyway" (if you can't see it, scroll to the bottom).
@ -38,7 +38,7 @@ Now, you can design tasks as you would in other operating systems.
- Execution phase
The operation is the same as the design phase of the Intel version. When running the 'easyspider_executestage' program for the first time, you need to set "Always Allow" in System Settings -> Security & Privacy, and re-run the "./easyspider_executestage EID" command, and click "Open Anyway" to run the task.
The operation is the same as the design phase of the Intel version. When running the 'easyspider_executestage' program for the first time, you need to set "Allow Anyway" in System Settings -> Security & Privacy, and re-run the "./easyspider_executestage EID" command, and click "Open" to run the task.
During the execution of the task, if an error similar to the following occurs, it can be ignored:

+ 2
- 2
.temp_to_pub/EasySpider_MacOS/第一次打开请看这个(包已损坏,无法验证开发者解决方案).txt View File

@ -27,7 +27,7 @@ xattr -c EasySpider.app
1. 由于MacOS的安全策略,系统首次打开EasySpider时不允许运行,并会提示您移动到废纸篓,这时您需要点击“取消”。
2. 然后打开系统偏好设置 -> 安全性与隐私。
2. 点击MacOS系统左上角苹果图标 -> 系统设置 -> 安全性与隐私。
3. 点击“仍要打开”(如果看不到,滑动至底部)。
@ -37,7 +37,7 @@ xattr -c EasySpider.app
- 执行阶段
与Intel版本设计阶段操作相同,首次运行'easyspider_executestage'程序时,需要在系统偏好设置 -> 安全性与隐私中设置“始终允许”,并重新运行"./easyspider_executestage EID"命令,并点击“仍要打开”来运行任务。
与Intel版本设计阶段操作相同,首次运行'easyspider_executestage'程序时,需要在系统设置 -> 安全性与隐私中设置“仍然允许”,并重新运行"./easyspider_executestage EID"命令,并点击“打开”来运行任务。
在执行任务过程中,如果出现类似下面的错误,可以忽略:

BIN
ElectronJS/EasySpider_en.crx View File


BIN
ElectronJS/EasySpider_zh.crx View File


+ 2
- 2
ExecuteStage/.vscode/launch.json View File

@ -12,8 +12,8 @@
"justMyCode": false,
// "args": ["--ids", "[7]", "--read_type", "remote", "--headless", "0"]
// "args": ["--ids", "[9]", "--read_type", "remote", "--headless", "0", "--saved_file_name", "YOUTUBE"]
"args": ["--ids", "[60]", "--headless", "0", "--user_data", "0", "--keyboard", "0",
"--read_type", "remote"]
"args": ["--ids", "[0]", "--headless", "0", "--user_data", "0", "--keyboard", "0",
"--read_type", "local"]
// "args": "--ids '[97]' --user_data 1 --server_address http://localhost:8074 --config_folder '/Users/naibo/Documents/EasySpider/ElectronJS/' --headless 0 --read_type remote --config_file_name config.json --saved_file_name"
}
]

+ 8
- 2
ExecuteStage/easyspider_executestage.py View File

@ -5,7 +5,7 @@ import copy
import platform
import shutil
import string
import undetected_chromedriver as uc
# import undetected_chromedriver as uc
from utils import detect_optimizable, download_image, extract_text_from_html, get_output_code, isnotnull, lowercase_tags_in_xpath, myMySQL, new_line, \
on_press_creator, on_release_creator, readCode, replace_field_values, send_email, split_text_by_lines, write_to_csv, write_to_excel, write_to_json
from myChrome import MyChrome
@ -2348,7 +2348,13 @@ if __name__ == '__main__':
service = json.loads(content.text) # 加载服务信息
else:
print("local")
with open("execution_instances/" + str(id) + ".json", 'r', encoding='utf-8') as f:
local_folder = os.path.join(os.getcwd(), "execution_instances")
if sys.platform == "darwin":
user_folder = os.path.expanduser(
"~/Library/Application Support/EasySpider/")
local_folder = os.path.join(user_folder, "execution_instances")
file_path = os.path.join(local_folder, str(id) + ".json")
with open(file_path, 'r', encoding='utf-8') as f:
content = f.read()
service = json.loads(content) # 加载服务信息
try:

Loading…
Cancel
Save