diff --git a/.temp_to_pub/EasySpider_Linux_x64/Code/easyspider_executestage.py b/.temp_to_pub/EasySpider_Linux_x64/Code/easyspider_executestage.py index 3f86c224..4ce4a488 100644 --- a/.temp_to_pub/EasySpider_Linux_x64/Code/easyspider_executestage.py +++ b/.temp_to_pub/EasySpider_Linux_x64/Code/easyspider_executestage.py @@ -1,5 +1,36 @@ # -*- coding: utf-8 -*- # import atexit +import atexit +import copy +import platform +import shutil +import string +# 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 +from threading import Thread, Event +from PIL import Image +from commandline_config import Config +import os +import csv +from openpyxl import load_workbook, Workbook +import random +from selenium.webdriver import ActionChains +from selenium.webdriver.support.ui import Select +from selenium.webdriver.common.desired_capabilities import DesiredCapabilities +from selenium.common.exceptions import StaleElementReferenceException, InvalidSelectorException +from selenium.common.exceptions import TimeoutException +from selenium.common.exceptions import NoSuchElementException +from selenium.webdriver.common.by import By +from selenium.webdriver.support import expected_conditions as EC +from selenium.webdriver.support.ui import WebDriverWait +from selenium import webdriver +from selenium.webdriver.common.action_chains import ActionChains +from selenium.webdriver.common.keys import Keys +from selenium.webdriver.chrome.options import Options +from selenium.webdriver.chrome.service import Service +from pynput.keyboard import Key, Listener from datetime import datetime import io # 遇到错误退出时应执行的代码 import json @@ -13,45 +44,46 @@ # import hashlib import time import requests +from multiprocessing import freeze_support +freeze_support() # 防止无限死循环多开 +try: + from ddddocr import DdddOcr + import onnxruntime + onnxruntime.set_default_logger_severity(3) # 隐藏onnxruntime的日志 +except: + print("OCR识别无法在当前环境下使用(ddddocr库缺失),请使用完整版执行器easyspider_executestage_full来运行需要OCR识别的任务。") + print("OCR recognition cannot be used in the current environment (ddddocr library is missing), please use the executor with ddddocr 'easyspider_executestage_full' to run the task which requires OCR recognition.") from urllib.parse import urljoin -from lxml import etree -import undetected_chromedriver as uc -from pynput.keyboard import Key, Listener -from selenium.webdriver.chrome.options import Options -from selenium.webdriver.common.keys import Keys -from selenium.webdriver.common.action_chains import ActionChains -from selenium import webdriver -from selenium.webdriver.support.ui import WebDriverWait -from selenium.webdriver.support import expected_conditions as EC -from selenium.webdriver.common.by import By -from selenium.common.exceptions import NoSuchElementException -from selenium.common.exceptions import TimeoutException -from selenium.common.exceptions import StaleElementReferenceException, InvalidSelectorException -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 random -# import pandas as pd -from openpyxl import load_workbook, Workbook +from lxml import etree, html +try: + import pandas as pd +except: + print("数据去重无法在当前环境下使用(pandas库缺失),请使用完整版执行器easyspider_executestage_full来运行需要去重的任务。") + print("Data deduplication cannot be used in the current environment (pandas library is missing), please use the executor with pandas 'easyspider_executestage_full' to run the task which requires data deduplication.") + time.sleep(1) + # import numpy -import csv -import os -from commandline_config import Config -import pytesseract -from PIL import Image +# import pytesseract # import uuid -from threading import Thread, Event -from myChrome import MyChrome, MyUCChrome -from utils import check_pause, download_image, get_output_code, isnull, lowercase_tags_in_xpath, myMySQL, new_line, on_press_creator, on_release_creator, write_to_csv, write_to_excel +if sys.platform != "darwin": + from myChrome import MyUCChrome desired_capabilities = DesiredCapabilities.CHROME desired_capabilities["pageLoadStrategy"] = "none" + class BrowserThread(Thread): - def __init__(self, browser_t, id, service, version, event, saveName, config): + def __init__(self, browser_t, id, service, version, event, saveName, config, option): Thread.__init__(self) + self.logs = io.StringIO() + try: + self.log = bool(service["recordLog"]) + except: + self.log = True self.browser = browser_t + self.option = option self.config = config + self.version = version + self.totalSteps = 0 self.id = id self.event = event try: @@ -60,32 +92,63 @@ def __init__(self, browser_t, id, service, version, event, saveName, config): now = datetime.now() # 将时间格式化为精确到秒的字符串 self.saveName = now.strftime("%Y_%m_%d_%H_%M_%S") - self.log = "" self.OUTPUT = "" self.SAVED = False self.BREAK = False + self.CONTINUE = False + try: + maximizeWindow = service["maximizeWindow"] + except: + maximizeWindow = 0 + if maximizeWindow == 1: + self.browser.maximize_window() # 名称设定 - if saveName != "": # 命令行覆盖保存名称 + if saveName != "": # 命令行覆盖保存名称 self.saveName = saveName # 保存文件的名字 now = datetime.now().strftime("%Y_%m_%d_%H_%M_%S") self.saveName = self.saveName.replace("current_time", now) - print("Save Name for task ID", i, "is:", self.saveName) - print("任务ID", i, "的保存文件名为:", self.saveName) - if not os.path.exists("Data/Task_" + str(i)): - os.mkdir("Data/Task_" + str(i)) - if not os.path.exists("Data/Task_" + str(i) + "/" + self.saveName): - os.mkdir("Data/Task_" + str(i) + "/" + self.saveName) # 创建保存文件夹用来保存截图 - + self.print_and_log("任务ID", id, "的保存文件名为:", self.saveName) + self.print_and_log("Save Name for task ID", id, "is:", self.saveName) + if not os.path.exists("Data/Task_" + str(id)): + os.mkdir("Data/Task_" + str(id)) + if not os.path.exists("Data/Task_" + str(id) + "/" + self.saveName): + os.mkdir("Data/Task_" + str(id) + "/" + + self.saveName) # 创建保存文件夹用来保存截图 + self.getDataStep = 0 + self.startSteps = 0 + try: + startFromExit = service["startFromExit"] # 从上次退出的步骤开始 + if startFromExit == 1: + with open("Data/Task_" + str(self.id) + "/" + self.saveName + '_steps.txt', 'r', + encoding='utf-8-sig') as file_obj: + self.startSteps = int(file_obj.read()) # 读取已执行步数 + except: + pass + if self.startSteps != 0: + self.print_and_log("此模式下,任务ID", self.id, "将从上次退出的步骤开始执行,之前已采集条数为", + self.startSteps, "条。") + self.print_and_log("In this mode, task ID", self.id, + "will start from the last step, before we already collected", self.startSteps, " items.") + else: + self.print_and_log("此模式下,任务ID", self.id, + "将从头F开始执行,如果需要从上次退出的步骤开始执行,请在保存任务时设置是否从上次保存位置开始执行为“是”。") + self.print_and_log("In this mode, task ID", self.id, + "will start from the beginning, if you want to start from the last step, please set the option 'start from the last step' to 'yes' when saving the task.") stealth_path = driver_path[:driver_path.find( "chromedriver")] + "stealth.min.js" with open(stealth_path, 'r') as f: js = f.read() - print("Loading stealth.min.js") + self.print_and_log("Loading stealth.min.js") self.browser.execute_cdp_cmd('Page.addScriptToEvaluateOnNewDocument', { - 'source': js}) # TMALL 反扒 + 'source': js}) # TMALL 反扒 WebDriverWait(self.browser, 10) - self.browser.get('about:blank') + self.browser.command_executor._commands["send_command"] = ("POST", '/session/$sessionId/chromium/send_command') + path = os.path.join(os.path.abspath("./"), "Data", "Task_" + str(self.id)) + self.paramss = {'cmd': 'Page.setDownloadBehavior', 'params': {'behavior': 'allow', 'downloadPath': path}} + + self.browser.execute("send_command", self.paramss) # 下载地址改变 + # self.browser.get('about:blank') self.procedure = service["graph"] # 程序执行流程 try: self.maxViewLength = service["maxViewLength"] # 最大显示长度 @@ -96,59 +159,68 @@ def __init__(self, browser_t, id, service, version, event, saveName, config): except: self.outputFormat = "csv" try: + self.task_version = service["version"] # 任务版本 if service["version"] >= "0.3.1": # 0.3.1及以上版本以上的EasySpider兼容从0.3.1版本开始的所有版本 pass else: # 0.3.1以下版本的EasySpider不兼容0.3.1及以上版本的EasySpider if service["version"] != version: - print("版本不一致,请使用" + - service["version"] + "版本的EasySpider运行该任务!") - print("Version not match, please use EasySpider " + - service["version"] + " to run this task!") + self.print_and_log("版本不一致,请使用" + + service["version"] + "版本的EasySpider运行该任务!") + self.print_and_log("Version not match, please use EasySpider " + + service["version"] + " to run this task!") self.browser.quit() sys.exit() except: # 0.2.0版本没有version字段,所以直接退出 - print("版本不一致,请使用v0.2.0版本的EasySpider运行该任务!") - print("Version not match, please use EasySpider v0.2.0 to run this task!") + self.print_and_log("版本不一致,请使用v0.2.0版本的EasySpider运行该任务!") + self.print_and_log( + "Version not match, please use EasySpider v0.2.0 to run this task!") self.browser.quit() sys.exit() try: self.save_threshold = service["saveThreshold"] # 保存最低阈值 except: self.save_threshold = 10 - self.links = list( - filter(isnull, service["links"].split("\n"))) # 要执行的link的列表 + try: + self.links = list( + filter(isnotnull, service["links"].split("\n"))) # 要执行的link的列表 + except: + self.links = list(filter(isnotnull, service["url"])) # 要执行的link self.OUTPUT = [] # 采集的数据 + try: + self.dataWriteMode = service["dataWriteMode"] # 数据写入模式,1为追加,2为覆盖 + except: + self.dataWriteMode = 1 + if self.outputFormat == "csv" or self.outputFormat == "txt" or self.outputFormat == "xlsx" or self.outputFormat == "json": + if self.dataWriteMode == 2 and os.path.exists("Data/Task_" + str(self.id) + "/" + self.saveName + '.' + self.outputFormat): + os.remove("Data/Task_" + str(self.id) + "/" + self.saveName + '.' + self.outputFormat) self.writeMode = 1 # 写入模式,0为新建,1为追加 - if self.outputFormat == "csv" or self.outputFormat == "txt": + if self.outputFormat == "csv" or self.outputFormat == "txt" or self.outputFormat == "xlsx": if not os.path.exists("Data/Task_" + str(self.id) + "/" + self.saveName + '.' + self.outputFormat): self.OUTPUT.append([]) # 添加表头 self.writeMode = 0 - elif self.outputFormat == "xlsx": - if not os.path.exists("Data/Task_" + str(self.id) + "/" + self.saveName + '.xlsx'): - self.OUTPUT.append([]) # 添加表头 - self.writeMode = 0 + elif self.outputFormat == "json": + self.writeMode = 3 # JSON模式无需判断是否存在文件 elif self.outputFormat == "mysql": self.mysql = myMySQL(config["mysql_config_path"]) - self.mysql.create_table(self.saveName, service["outputParameters"]) + self.mysql.create_table(self.saveName, service["outputParameters"], remove_if_exists=self.dataWriteMode == 2) self.writeMode = 2 - if self.writeMode == 1: - print("追加模式") - print("Append Mode") - elif self.writeMode == 0: - print("新建模式") - print("New Mode") + if self.writeMode == 0: + self.print_and_log("新建模式|Create Mode") + elif self.writeMode == 1: + self.print_and_log("追加模式|Append Mode") elif self.writeMode == 2: - print("MySQL模式") - print("MySQL Mode") + self.print_and_log("MySQL模式|MySQL Mode") + elif self.writeMode == 3: + self.print_and_log("JSON模式|JSON Mode") self.containJudge = service["containJudge"] # 是否含有判断语句 self.outputParameters = {} + self.service = service self.outputParametersTypes = [] - self.outputParametersRecord = [] # 字段是否被记录 + self.outputParametersRecord = [] # 字段是否被记录 self.dataNotFoundKeys = {} # 记录没有找到数据的key - self.log = "" # 记下现在总共开了多少个标签页 self.history = {"index": 0, "handle": None} # 记录页面现在所以在的历史记录的位置 self.SAVED = False # 记录是否已经存储了 - for param in service["outputParameters"]: # 初始化输出参数 + for param in service["outputParameters"]: # 初始化输出参数 if param["name"] not in self.outputParameters.keys(): self.outputParameters[param["name"]] = "" self.dataNotFoundKeys[param["name"]] = False @@ -157,7 +229,8 @@ def __init__(self, browser_t, id, service, version, event, saveName, config): except: self.outputParametersTypes.append("text") try: - self.outputParametersRecord.append(bool(param["recordASField"])) + self.outputParametersRecord.append( + bool(param["recordASField"])) except: self.outputParametersRecord.append(True) # 文件叠加的时候不添加表头 @@ -166,6 +239,11 @@ def __init__(self, browser_t, id, service, version, event, saveName, config): self.OUTPUT[0].append(param["name"]) self.urlId = 0 # 全局记录变量 self.preprocess() # 预处理,优化提取数据流程 + try: + self.inputExcel = service["inputExcel"] # 输入Excel + except: + self.inputExcel = "" + self.readFromExcel() # 读取Excel获得参数值 # 检测如果没有复杂的操作,优化提取数据流程 def preprocess(self): @@ -174,18 +252,50 @@ def preprocess(self): iframe = node["parameters"]["iframe"] except: node["parameters"]["iframe"] = False + try: node["parameters"]["xpath"] = lowercase_tags_in_xpath( node["parameters"]["xpath"]) except: pass + try: + node["parameters"]["waitElementIframeIndex"] = int( + node["parameters"]["waitElementIframeIndex"]) + except: + node["parameters"]["waitElement"] = "" + node["parameters"]["waitElementTime"] = 10 + node["parameters"]["waitElementIframeIndex"] = 0 if node["option"] == 1: # 打开网页操作 try: cookies = node["parameters"]["cookies"] except: node["parameters"]["cookies"] = "" - if node["option"] == 3: # 提取数据操作 - params = node["parameters"]["params"] + elif node["option"] == 2: # 点击操作 + try: + alertHandleType = node["parameters"]["alertHandleType"] + except: + node["parameters"]["alertHandleType"] = 0 + if node["parameters"]["useLoop"]: + if self.task_version <= "0.3.5": + # 0.3.5及以下版本的EasySpider下的循环点击不支持相对XPath + node["parameters"]["xpath"] = "" + self.print_and_log("您的任务版本号为" + self.task_version + + ",循环点击不支持相对XPath写法,已自动切换为纯循环的XPath") + elif node["option"] == 3: # 提取数据操作 + node["parameters"]["recordASField"] = 0 + try: + params = node["parameters"]["params"] + except: + node["parameters"]["params"] = node["parameters"]["paras"] # 兼容0.5.0及以下版本的EasySpider + params = node["parameters"]["params"] + try: + clear = node["parameters"]["clear"] + except: + node["parameters"]["clear"] = 0 + try: + newLine = node["parameters"]["newLine"] + except: + node["parameters"]["newLine"] = 1 for param in params: try: iframe = param["iframe"] @@ -195,66 +305,300 @@ def preprocess(self): param["relativeXPath"] = lowercase_tags_in_xpath(param["relativeXPath"]) except: pass - if param["beforeJS"] == "" and param["afterJS"] == "" and param["contentType"] <= 1 and param["nodeType"] <= 2: - param["optimizable"] = True + try: + node["parameters"]["recordASField"] = param["recordASField"] + except: + node["parameters"]["recordASField"] = 1 + try: + splitLine = int(param["splitLine"]) + except: + param["splitLine"] = 0 + if param["contentType"] == 8: + self.print_and_log( + "默认的ddddocr识别功能如果觉得不好用,可以自行修改源码get_content函数->contentType == 8的位置换成自己想要的OCR模型然后自己编译运行;或者可以先设置采集内容类型为“元素截图”把图片保存下来,然后用自定义操作调用自己写的程序,程序的功能是读取这个最新生成的图片,然后用好用的模型,如PaddleOCR把图片识别出来,然后把返回值返回给程序作为参数输出。") + self.print_and_log( + "If you think the default ddddocr function is not good enough, you can modify the source code get_content function -> contentType == 8 position to your own OCR model and then compile and run it; or you can first set the content type of the crawler to \"Element Screenshot\" to save the picture, and then call your own program with custom operations. The function of the program is to read the latest generated picture, then use a good model, such as PaddleOCR to recognize the picture, and then return the return value as a parameter output to the program.") + param["optimizable"] = detect_optimizable(param) + elif node["option"] == 4: # 输入文字 + try: + index = node["parameters"]["index"] # 索引值 + except: + node["parameters"]["index"] = 0 + elif node["option"] == 5: # 自定义操作 + try: + clear = node["parameters"]["clear"] + except: + node["parameters"]["clear"] = 0 + try: + newLine = node["parameters"]["newLine"] + except: + node["parameters"]["newLine"] = 1 + elif node["option"] == 7: # 移动到元素 + if node["parameters"]["useLoop"]: + if self.task_version <= "0.3.5": + # 0.3.5及以下版本的EasySpider下的循环点击不支持相对XPath + node["parameters"]["xpath"] = "" + self.print_and_log("您的任务版本号为" + self.task_version + + ",循环点击不支持相对XPath写法,已自动切换为纯循环的XPath") + elif node["option"] == 8: # 循环操作 + try: + exitElement = node["parameters"]["exitElement"] + if exitElement == "": + node["parameters"]["exitElement"] = "//body" + except: + node["parameters"]["exitElement"] = "//body" + node["parameters"]["quickExtractable"] = False # 是否可以快速提取 + try: + skipCount = node["parameters"]["skipCount"] + except: + node["parameters"]["skipCount"] = 0 + # 如果(不)固定元素列表循环中只有一个提取数据操作,且提取数据操作的提取内容为元素截图,那么可以快速提取 + if len(node["sequence"]) == 1 and self.procedure[node["sequence"][0]]["option"] == 3 and (int(node["parameters"]["loopType"]) == 1 or int(node["parameters"]["loopType"]) == 2): + try: + params = self.procedure[node["sequence"][0]]["parameters"]["params"] + except: + params = self.procedure[node["sequence"][0]]["parameters"]["paras"] # 兼容0.5.0及以下版本的EasySpider + try: + waitElement = self.procedure[node["sequence"][0]]["parameters"]["waitElement"] + except: + waitElement = "" + if node["parameters"]["iframe"]: + node["parameters"]["quickExtractable"] = False # 如果是iframe,那么不可以快速提取 else: - param["optimizable"] = False + node["parameters"]["quickExtractable"] = True # 先假设可以快速提取 + if node["parameters"]["skipCount"] > 0: + node["parameters"]["quickExtractable"] = False # 如果有跳过的元素,那么不可以快速提取 + for param in params: + optimizable = detect_optimizable(param, ignoreWaitElement=False, waitElement=waitElement) + try: + iframe = param["iframe"] + except: + param["iframe"] = False + if param["iframe"] and not param["relative"]: # 如果是iframe,那么不可以快速提取 + optimizable = False + if not optimizable: # 如果有一个不满足优化条件,那么就不能快速提取 + node["parameters"]["quickExtractable"] = False + break + if node["parameters"]["quickExtractable"]: + self.print_and_log("循环操作<" + node["title"] + ">可以快速提取数据") + self.print_and_log("Loop operation <" + node["title"] + "> can extract data quickly") + try: + node["parameters"]["clear"] = self.procedure[node["sequence"][0]]["parameters"]["clear"] + except: + node["parameters"]["clear"] = 0 + try: + node["parameters"]["newLine"] = self.procedure[node["sequence"][0]]["parameters"]["newLine"] + except: + node["parameters"]["newLine"] = 1 + if int(node["parameters"]["loopType"]) == 1: # 不固定元素列表 + node["parameters"]["baseXPath"] = node["parameters"]["xpath"] + elif int(node["parameters"]["loopType"]) == 2: # 固定元素列表 + node["parameters"]["baseXPath"] = node["parameters"]["pathList"] + node["parameters"]["quickParams"] = [] + for param in params: + content_type = "" + if param["relativeXPath"].find("/@href") >= 0 or param["relativeXPath"].find("/text()") >= 0 or param["relativeXPath"].find( + "::text()") >= 0: + content_type = "" + elif param["nodeType"] == 2: + content_type = "//@href" + elif param["nodeType"] == 4: # 图片链接 + content_type = "//@src" + elif param["contentType"] == 1: + content_type = "/text()" + elif param["contentType"] == 0: + content_type = "//text()" + if param["relative"]: # 如果是相对XPath + xpath = "." + param["relativeXPath"] + content_type + else: + xpath = param["relativeXPath"] + content_type + # 如果是id()或(//div)[1]这种形式,不需要包/html/body + # if xpath.find("/body") < 0 and xpath.startswith("/"): + # xpath = "/html/body" + xpath + node["parameters"]["quickParams"].append({ + "name": param["name"], + "relative": param["relative"], + "xpath": xpath, + "nodeType": param["nodeType"], + "default": param["default"], + }) + self.print_and_log("预处理完成|Preprocess completed") + + def readFromExcel(self): + if self.inputExcel == "": + return 0 + try: + workbook = load_workbook(self.inputExcel) + except: + self.print_and_log("读取Excel失败,将会使用默认参数执行任务,请检查文件路径是否正确:", + os.path.abspath(self.inputExcel)) + self.print_and_log( + "Failed to read Excel, will execute the task with default parameters, please check if the file path is correct: ", + os.path.abspath(self.inputExcel)) + time.sleep(5) + return 0 + + sheet_name_list = workbook.sheetnames + sheet = workbook[sheet_name_list[0]] + data = [] + + for row in sheet.iter_rows(values_only=True): + data.append(list(row)) + + result = list(zip(*data)) + result_dict = {} + for row in result: + key = row[0] + values = [str(val) for val in row[1:] if val is not None] + result_dict.setdefault(key, []).extend([values]) + + data = {} + for key, arr in result_dict.items(): + result = [] + for cols in zip(*arr): + result.append("~".join(cols)) + data[key] = result + + try: + if "urlList_0" in data.keys(): + self.links = data["urlList_0"] + except: + self.links = "about:blank" + task = self.service + for key, value in data.items(): + for i in range(len(task["inputParameters"])): + if key == task["inputParameters"][i]["name"]: + nodeId = int(task["inputParameters"][i]["nodeId"]) + node = task["graph"][nodeId] + value = "\r\n".join(value) + if node["option"] == 1: + node["parameters"]["links"] = value + elif node["option"] == 4: + node["parameters"]["value"] = value + elif node["option"] == 8 and node["parameters"]["loopType"] == 0: + node["parameters"]["exitCount"] = int(value) + elif node["option"] == 8: + node["parameters"]["textList"] = value + break + self.print_and_log("已从Excel读取输入参数,覆盖了原有输入参数。") + self.print_and_log( + "Already read input parameters from Excel and overwrite the original input parameters.") + + def removeDuplicateData(self): + try: + removeDuplicateData = self.service["removeDuplicate"] + except: + removeDuplicateData = 0 + if removeDuplicateData == 1: + self.print_and_log("正在去除重复数据,请稍后……") + self.print_and_log("Removing duplicate data, please wait...") + if self.outputFormat == "csv" or self.outputFormat == "txt" or self.outputFormat == "json" or self.outputFormat == "xlsx": + file_name = "Data/Task_" + \ + str(self.id) + "/" + self.saveName + \ + '.' + self.outputFormat + if self.outputFormat == "csv" or self.outputFormat == "txt": + df = pd.read_csv(file_name) + df.drop_duplicates(inplace=True) + df.to_csv(file_name, index=False) + elif self.outputFormat == "xlsx": + df = pd.read_excel(file_name) + df.drop_duplicates(inplace=True) + df.to_excel(file_name, index=False) + elif self.outputFormat == "json": + df = pd.read_json(file_name) + df.drop_duplicates(inplace=True) + df.to_json(file_name, orient="records", force_ascii=False) + elif self.outputFormat == "mysql": + self.mysql.remove_duplicate_data() + self.print_and_log("去重完成。") + self.print_and_log("Duplicate data removed.") def run(self): # 挨个执行程序 for i in range(len(self.links)): - print("正在执行第", i + 1, "/ ", len(self.links), "个链接") - print("Executing link", i + 1, "/ ", len(self.links)) + self.print_and_log("正在执行第", i + 1, "/", len(self.links), "个链接") + self.print_and_log("Executing link", i + 1, + "/", len(self.links)) self.executeNode(0) self.urlId = self.urlId + 1 files = os.listdir("Data/Task_" + str(self.id) + "/" + self.saveName) # 如果目录为空,则删除该目录 - if not files: - os.rmdir("Data/Task_" + str(self.id) + "/" + self.saveName) - print("Done!") - print("执行完成!") - self.recordLog("Done!") + # if not files: + # os.rmdir("Data/Task_" + str(self.id) + "/" + self.saveName) + self.print_and_log("Done!") + self.print_and_log("执行完成!") self.saveData(exit=True) + self.removeDuplicateData() if self.outputFormat == "mysql": self.mysql.close() + try: + quitWaitTime = self.service["quitWaitTime"] + except: + quitWaitTime = 60 + self.print_and_log(f"任务执行完毕,将在{quitWaitTime}秒后自动退出浏览器并清理临时用户目录,等待时间可在保存任务对话框中设置。") + self.print_and_log(f"The task is completed, the browser will exit automatically and the temporary user directory will be cleaned up after {quitWaitTime} seconds, the waiting time can be set in the save task dialog.") + time.sleep(quitWaitTime) + self.browser.quit() + self.print_and_log("正在清理临时用户目录……|Cleaning up temporary user directory...") + try: + shutil.rmtree(self.option["tmp_user_data_folder"]) + except: + pass + self.print_and_log("清理完成!|Clean up completed!") + self.print_and_log("您现在可以安全的关闭此窗口了。|You can safely close this window now.") + + def recordLog(self, *args, **kwargs): + now = datetime.now().strftime("%Y-%m-%d %H:%M:%S.%f") + print(now + ":", *args, file=self.logs, **kwargs) - def recordLog(self, str=""): - self.log = self.log + str + "\n" - - # 控制台打印log函数 - - def Log(self, text, text2=""): - switch = False - if switch: - print(text, text2) + # 定义一个自定义的 print 函数,它将内容同时打印到屏幕和文件中 + def print_and_log(self, *args, **kwargs): + now = datetime.now().strftime("%Y-%m-%d %H:%M:%S.%f") + # 将内容打印到屏幕 + print(*args, **kwargs) - # @atexit.register - # def clean(self): - # self.saveData(exit=True) - # self.browser.quit() - # sys.exit(0) + # 将内容写入文件 + print(now + ":", *args, file=self.logs, **kwargs) def saveData(self, exit=False): # 每save_threshold条保存一次 if exit == True or len(self.OUTPUT) >= self.save_threshold: # 写入日志 - with open("Data/Task_" + str(self.id) + "/" + self.saveName + '_log.txt', 'a', encoding='utf-8-sig') as file_obj: - file_obj.write(self.log) + # self.recordLog("持久化存储数据/Persistently store data") + if self.log: + with open("Data/Task_" + str(self.id) + "/" + self.saveName + '.log', 'a', + encoding='utf-8-sig') as file_obj: + file_obj.write(self.logs.getvalue()) + file_obj.close() + # 写入已执行步数 + with open("Data/Task_" + str(self.id) + "/" + self.saveName + '_steps.txt', 'w', + encoding='utf-8-sig') as file_obj: + file_obj.write(str(self.totalSteps + 1)) file_obj.close() # 写入数据 if self.outputFormat == "csv" or self.outputFormat == "txt": file_name = "Data/Task_" + \ - str(self.id) + "/" + self.saveName + '.' + self.outputFormat - write_to_csv(file_name, self.OUTPUT, self.outputParametersRecord) + str(self.id) + "/" + self.saveName + \ + '.' + self.outputFormat + write_to_csv(file_name, self.OUTPUT, + self.outputParametersRecord) elif self.outputFormat == "xlsx": file_name = "Data/Task_" + \ - str(self.id) + "/" + self.saveName + '.xlsx' - write_to_excel(file_name, self.OUTPUT, self.outputParametersTypes, self.outputParametersRecord) + str(self.id) + "/" + self.saveName + '.xlsx' + write_to_excel( + file_name, self.OUTPUT, self.outputParametersTypes, self.outputParametersRecord) + elif self.outputFormat == "json": + file_name = "Data/Task_" + \ + str(self.id) + "/" + self.saveName + '.json' + write_to_json(file_name, self.OUTPUT, self.outputParametersTypes, + self.outputParametersRecord, self.outputParameters.keys()) elif self.outputFormat == "mysql": - self.mysql.write_to_mysql(self.OUTPUT, self.outputParametersRecord, self.outputParametersTypes) - + self.mysql.write_to_mysql( + self.OUTPUT, self.outputParametersRecord, self.outputParametersTypes) + self.OUTPUT = [] - self.log = "" + self.logs.truncate(0) # 清空日志 + self.logs.seek(0) # 清空日志 def scrollDown(self, param, rt=""): try: @@ -262,37 +606,117 @@ def scrollDown(self, param, rt=""): except: pass scrollType = int(param["scrollType"]) + try: + param["scrollCount"] = int(param["scrollCount"]) + except: + param["scrollCount"] = 1 try: if scrollType != 0 and param["scrollCount"] > 0: # 控制屏幕向下滚动 - for i in range(param["scrollCount"]): - self.Log("Wait for set second after screen scrolling") - body = self.browser.find_element( - By.CSS_SELECTOR, "body", iframe=param["iframe"]) - if scrollType == 1: - body.send_keys(Keys.PAGE_DOWN) - elif scrollType == 2: + if scrollType == 1 or scrollType == 2: + for i in range(param["scrollCount"]): + body = self.browser.find_element( + By.CSS_SELECTOR, "body", iframe=param["iframe"]) + if scrollType == 1: + body.send_keys(Keys.PAGE_DOWN) + elif scrollType == 2: + body.send_keys(Keys.END) + try: + time.sleep(param["scrollWaitTime"]) # 下拉完等待 + except: + pass + self.print_and_log("向下滚动,第", i + 1, "次。") + self.print_and_log( + "Scroll down, the", i + 1, "time.") + elif scrollType == 3: + bodyText = "" + i = 0 + while True: + newBodyText = self.browser.find_element( + By.CSS_SELECTOR, "body", iframe=False).text + if param["iframe"]: # 如果标记了iframe + iframes = self.browser.find_elements( + By.CSS_SELECTOR, "iframe", iframe=False) + for iframe in iframes: + self.browser.switch_to.default_content() + self.browser.switch_to.frame(iframe) + iframe_text = super(self.browser.__class__, self.browser).find_element( + By.CSS_SELECTOR, "body").text # 用super调用父类的方法 + newBodyText += iframe_text + self.browser.switch_to.default_content() + if newBodyText == bodyText: + self.print_and_log("页面已检测不到新内容,停止滚动。") + self.print_and_log( + "No new content detected on the page, stop scrolling.") + break + else: + bodyText = newBodyText + body = self.browser.find_element( + By.CSS_SELECTOR, "body", iframe=param["iframe"]) body.send_keys(Keys.END) - try: - time.sleep(param["scrollWaitTime"]) # 下拉完等待 - except: - pass - except: - self.Log('Time out after set seconds when scrolling. ') - self.recordLog('Time out after set seconds when scrolling') - self.browser.execute_script('window.stop()') + self.print_and_log("滚动到底部,第", i + 1, "次。") + self.print_and_log( + "Scroll to the bottom, the", i + 1, "time.") + i = i + 1 + try: + time.sleep(param["scrollWaitTime"]) # 下拉完等待 + except: + pass + except Exception as e: + self.print_and_log("滚动屏幕时出错|Error scrolling screen:", e) + try: + self.browser.execute_script('window.stop()') + except: + pass if scrollType != 0 and param["scrollCount"] > 0: # 控制屏幕向下滚动 - for i in range(param["scrollCount"]): - self.Log("Wait for set second after screen scrolling") - body = self.browser.find_element( - By.CSS_SELECTOR, "body", iframe=param["iframe"]) - if scrollType == 1: - body.send_keys(Keys.PGDN) - elif scrollType == 2: + if scrollType == 1 or scrollType == 2: + for i in range(param["scrollCount"]): + body = self.browser.find_element( + By.CSS_SELECTOR, "body", iframe=param["iframe"]) + if scrollType == 1: + body.send_keys(Keys.PAGE_DOWN) + elif scrollType == 2: + body.send_keys(Keys.END) + try: + time.sleep(param["scrollWaitTime"]) # 下拉完等待 + except: + pass + self.print_and_log("向下滚动,第", i + 1, "次。") + self.print_and_log( + "Scroll down, the", i + 1, "time.") + elif scrollType == 3: + bodyText = "" + i = 0 + while True: + newBodyText = self.browser.find_element( + By.CSS_SELECTOR, "body", iframe=False).text + if param["iframe"]: # 如果标记了iframe + iframes = self.browser.find_elements( + By.CSS_SELECTOR, "iframe", iframe=False) + for iframe in iframes: + self.browser.switch_to.default_content() + self.browser.switch_to.frame(iframe) + iframe_text = super(self.browser.__class__, self.browser).find_element( + By.CSS_SELECTOR, "body").text # 用super调用父类的方法 + newBodyText += iframe_text + self.browser.switch_to.default_content() + if newBodyText == bodyText: + self.print_and_log("页面已检测不到新内容,停止滚动。") + self.print_and_log( + "No new content detected on the page, stop scrolling.") + break + else: + bodyText = newBodyText + body = self.browser.find_element( + By.CSS_SELECTOR, "body", iframe=param["iframe"]) body.send_keys(Keys.END) - try: - time.sleep(param["scrollWaitTime"]) # 下拉完等待 - except: - pass + self.print_and_log("滚动到底部,第", i + 1, "次。") + self.print_and_log( + "Scroll to the bottom, the", i + 1, "time.") + i = i + 1 + try: + time.sleep(param["scrollWaitTime"]) # 下拉完等待 + except: + pass if rt != "": rt.end() @@ -302,15 +726,9 @@ def execute_code(self, codeMode, code, max_wait_time, element=None, iframe=False return "" if max_wait_time == 0: max_wait_time = 999999 - # print(codeMode, code) + # self.print_and_log(codeMode, code) # 将value中的Field[""]替换为outputParameters中的键值 - pattern = r'Field\["([^"]+)"\]' - try: - replaced_text = re.sub( - pattern, lambda match: self.outputParameters.get(match.group(1), ''), code) - except: - replaced_text = code - code = replaced_text + code = replace_field_values(code, self.outputParameters, self) if iframe and self.browser.iframe_env == False: # 获取所有的 iframe self.browser.switch_to.default_content() @@ -325,7 +743,7 @@ def execute_code(self, codeMode, code, max_wait_time, element=None, iframe=False self.browser.iframe_env = True break except: - print("Iframe switch failed") + self.print_and_log("Iframe switch failed") elif not iframe and self.browser.iframe_env == True: self.browser.switch_to.default_content() self.browser.iframe_env = False @@ -347,6 +765,27 @@ def execute_code(self, codeMode, code, max_wait_time, element=None, iframe=False except: output = "" self.recordLog("JavaScript execution failed") + elif int(codeMode) == 5: + try: + code = readCode(code) + output = exec(code) + self.recordLog("执行下面的代码:" + code) + self.recordLog("Execute the following code:" + code) + except Exception as e: + self.print_and_log("执行下面的代码时出错:" + code, ",错误为:", e) + self.print_and_log("Error executing the following code:" + + code, ", error is:", e) + elif int(codeMode) == 6: + try: + code = readCode(code) + output = eval(code) + self.recordLog("获得下面的代码返回值:" + code) + self.recordLog( + "Get the return value of the following code:" + code) + except Exception as e: + self.print_and_log("获得下面的代码返回值时出错:" + code, ",错误为:", e) + self.print_and_log( + "Error executing and getting return value the following code:" + code, ", error is:", e) elif int(codeMode) == 1: self.recordLog("Execute System Call:" + code) self.recordLog("执行系统命令:" + code) @@ -357,25 +796,34 @@ def execute_code(self, codeMode, code, max_wait_time, element=None, iframe=False code, capture_output=True, text=True, timeout=max_wait_time, shell=True) # 输出命令返回值 output = output.stdout - print(output) + self.print_and_log(output) except subprocess.TimeoutExpired: # 命令执行时间超过指定值,抛出异常 self.recordLog("Command timed out") self.recordLog("命令执行超时") except Exception as e: - print(e) # 打印异常信息 + self.print_and_log(e) # 打印异常信息 self.recordLog("Command execution failed") self.recordLog("命令执行失败") - return str(output) + try: + output = str(output) + except: + output = "无法转换为字符串|Unable to convert to string" + self.print_and_log("无法转换为字符串|Unable to convert to string", output) + return output def customOperation(self, node, loopValue, loopPath, index): params = node["parameters"] + if params["clear"] == 1: + self.clearOutputParameters() codeMode = int(params["codeMode"]) code = params["code"] output = "" max_wait_time = int(params["waitTime"]) if codeMode == 2: # 使用循环的情况下,传入的clickPath就是实际的xpath try: + loopPath = replace_field_values( + loopPath, self.outputParameters, self) elements = self.browser.find_elements( By.XPATH, loopPath, iframe=params["iframe"]) element = elements[index] @@ -383,27 +831,55 @@ def customOperation(self, node, loopValue, loopPath, index): codeMode, code, max_wait_time, element, iframe=params["iframe"]) except: output = "" - print("JavaScript execution failed") + self.print_and_log("JavaScript execution failed") elif codeMode == 3: self.BREAK = True - else: # 0 1 + self.recordLog("跳出循环|Break the loop") + elif codeMode == 4: + self.CONTINUE = True + self.recordLog("跳过本次循环|Skip this loop") + elif codeMode == 7: # 暂停程序执行 + self.event.clear() + self.print_and_log( + f"根据设置的自定义操作,任务已暂停,长按{self.service['pauseKey']}键继续执行...|Task paused according to custom operation, long press '{self.service['pauseKey']}' to continue...") + elif codeMode == 8: # 刷新页面 + self.browser.refresh() + self.print_and_log("根据设置的自定义操作,任务已刷新页面|Task refreshed page according to custom operation") + elif codeMode == 9: # 发送邮件 + send_email(node["parameters"]["emailConfig"]) + else: # 0 1 5 6 output = self.execute_code( codeMode, code, max_wait_time, iframe=params["iframe"]) recordASField = bool(params["recordASField"]) - if recordASField: - print("操作<" + node["title"] + ">的返回值为:" + output) - print("The return value of operation <" + node["title"] + "> is: " + output) + # if recordASField: + # self.print_and_log("操作<" + node["title"] + ">的返回值为:" + output) + # self.print_and_log("The return value of operation <" + node["title"] + "> is: " + output) self.outputParameters[node["title"]] = output - if recordASField: - line = new_line(self.outputParameters, self.maxViewLength, self.outputParametersRecord) + if recordASField and params["newLine"]: + line = new_line(self.outputParameters, + self.maxViewLength, self.outputParametersRecord) self.OUTPUT.append(line) def switchSelect(self, param, loopValue): - optionMode = int(param["optionMode"]) + optionMode = param["optionMode"] optionValue = param["optionValue"] + if param["useLoop"]: + index = param["index"] + if index != 0: + try: + optionValue = loopValue.split("~")[index - 1] + except: + self.print_and_log("取值失败,可能是因为取值索引超出范围,将使用整个文本值") + self.print_and_log( + "Failed to get value, maybe because the index is out of range, will use the entire text value") + else: + optionValue = loopValue + optionMode = 1 try: + xpath = replace_field_values( + param["xpath"], self.outputParameters, self) dropdown = Select(self.browser.find_element( - By.XPATH, param["xpath"], iframe=param["iframe"])) + By.XPATH, xpath, iframe=param["iframe"])) try: if optionMode == 0: # 获取当前选中的选项索引 @@ -419,77 +895,121 @@ def switchSelect(self, param, loopValue): dropdown.select_by_value(optionValue) elif optionMode == 3: dropdown.select_by_visible_text(optionValue) + # self.recordLog("切换到下拉框选项|Change to drop-down box option:", xpath) except: - print("切换下拉框选项失败:", param["xpath"], - param["optionMode"], param["optionValue"]) - print("Failed to change drop-down box option:", - param["xpath"], param["optionMode"], param["optionValue"]) + self.print_and_log("切换下拉框选项失败:", xpath, + param["optionMode"], param["optionValue"]) + self.print_and_log("Failed to change drop-down box option:", + xpath, param["optionMode"], param["optionValue"]) except: - print("找不到下拉框元素:", param["xpath"]) - print("Cannot find drop-down box element:", param["xpath"]) + self.print_and_log("找不到下拉框元素:", xpath) + self.print_and_log("Cannot find drop-down box element:", xpath) def moveToElement(self, param, loopElement=None, loopPath="", index=0): time.sleep(0.1) # 移动之前等待0.1秒 + loopPath = replace_field_values(loopPath, self.outputParameters, self) + xpath = replace_field_values( + param["xpath"], self.outputParameters, self) if param["useLoop"]: # 使用循环的情况下,传入的clickPath就是实际的xpath - path = loopPath + if xpath == "": + path = loopPath + else: + path = "(" + loopPath + ")" + \ + "[" + str(index + 1) + "]" + \ + xpath + index = 0 # 如果是相对循环内元素的点击,在定位到元素后,index应该重置为0 # element = loopElement else: index = 0 - path = param["xpath"] # 不然使用元素定义的xpath - # element = self.browser.find_element( - # By.XPATH, path, iframe=param["iframe"]) + path = xpath # 不然使用元素定义的xpath + path = replace_field_values(path, self.outputParameters, self) try: elements = self.browser.find_elements( By.XPATH, path, iframe=param["iframe"]) element = elements[index] try: ActionChains(self.browser).move_to_element(element).perform() + # self.recordLog("移动到元素|Move to element:", path) except: - print("移动鼠标到元素失败:", param["xpath"]) - print("Failed to move mouse to element:", param["xpath"]) + self.print_and_log("移动鼠标到元素失败:", xpath) + self.print_and_log("Failed to move mouse to element:", xpath) except: - print("找不到元素:", param["xpath"]) - print("Cannot find element:", param["xpath"]) + self.print_and_log("找不到元素:", xpath) + self.print_and_log("Cannot find element:", xpath) # 执行节点关键函数部分 - def executeNode(self, nodeId, loopValue="", loopPath="", index=0): node = self.procedure[nodeId] - WebDriverWait(self.browser, 10).until - # 等待元素出现才进行操作,10秒内未出现则报错 - (EC.visibility_of_element_located( - (By.XPATH, node["parameters"]["xpath"]))) - - # 根据不同选项执行不同操作 - if node["option"] == 0 or node["option"] == 10: # root操作,条件分支操作 - for i in node["sequence"]: # 从根节点开始向下读取 - self.executeNode(i, loopValue, loopPath, index) - elif node["option"] == 1: # 打开网页操作 - self.recordLog("openPage") - self.openPage(node["parameters"], loopValue) - elif node["option"] == 2: # 点击元素 - self.recordLog("Click") - self.clickElement(node["parameters"], loopValue, loopPath, index) - elif node["option"] == 3: # 提取数据 - self.recordLog("getData") - self.getData(node["parameters"], loopValue, node["isInLoop"], - parentPath=loopPath, index=index) - self.saveData() - elif node["option"] == 4: # 输入文字 - self.inputInfo(node["parameters"], loopValue) - elif node["option"] == 5: # 自定义操作 - self.customOperation(node, loopValue, loopPath, index) - self.saveData() - elif node["option"] == 6: # 切换下拉框 - self.switchSelect(node["parameters"], loopValue) - elif node["option"] == 7: # 鼠标移动到元素上 - self.moveToElement(node["parameters"], loopValue, loopPath, index) - elif node["option"] == 8: # 循环 - self.recordLog("loop") - self.loopExecute(node, loopValue, loopPath, index) # 执行循环 - elif node["option"] == 9: # 条件分支 - self.recordLog("judge") - self.judgeExecute(node, loopValue, loopPath, index) + # WebDriverWait(self.browser, 10).until + # # 等待元素出现才进行操作,10秒内未出现则报错 + # (EC.visibility_of_element_located( + # (By.XPATH, node["parameters"]["xpath"]))) + try: + if node["parameters"]["waitElement"] != "": + waitElement = replace_field_values( + node["parameters"]["waitElement"], self.outputParameters, self) + waitElementTime = float(node["parameters"]["waitElementTime"]) + waitElementIframeIndex = node["parameters"]["waitElementIframeIndex"] + self.print_and_log("等待元素出现:", waitElement) + self.print_and_log( + "Waiting for element to appear:", waitElement) + if waitElementIframeIndex > 0: + iframes = self.browser.find_elements( + By.CSS_SELECTOR, "iframe", iframe=False) + iframe = iframes[waitElementIframeIndex - 1] + self.browser.switch_to.frame(iframe) + WebDriverWait(self.browser, waitElementTime).until( + EC.presence_of_element_located((By.XPATH, waitElement)) + ) + if waitElementIframeIndex > 0: + self.browser.switch_to.default_content() + except Exception as e: + if waitElement != "": + self.print_and_log("等待元素出现超时:", waitElement, ",将继续执行。") + self.print_and_log("Timeout waiting for element to appear:", + waitElement, ", will continue to execute.") + self.recordLog(e) + self.recordLog("Wait element not found") + self.recordLog("执行节点|Execute node:", node["title"]) + try: + # 根据不同选项执行不同操作 + if node["option"] == 0 or node["option"] == 10: # root操作,条件分支操作 + for i in node["sequence"]: # 从根节点开始向下读取 + self.executeNode(i, loopValue, loopPath, index) + elif node["option"] == 1: # 打开网页操作 + # if not (nodeId == 1 and self.service["cloudflare"] == 1): + self.openPage(node["parameters"], loopValue) + elif node["option"] == 2: # 点击元素 + self.clickElement(node["parameters"], loopValue, loopPath, index) + elif node["option"] == 3: # 提取数据 + # 针对提取数据操作,设置操作开始的步骤,用于不小心关闭后的恢复的增量采集 + if self.totalSteps >= self.startSteps: + self.getData(node["parameters"], loopValue, node["isInLoop"], + parentPath=loopPath, index=index) + self.saveData() + else: + # self.getDataStep += 1 + self.print_and_log("跳过第" + str(self.totalSteps) + "次提取数据。") + self.print_and_log( + "Skip the " + str(self.totalSteps) + "th data extraction.") + self.totalSteps += 1 # 总步数加一 + elif node["option"] == 4: # 输入文字 + self.inputInfo(node["parameters"], loopValue) + elif node["option"] == 5: # 自定义操作 + self.customOperation(node, loopValue, loopPath, index) + self.saveData() + elif node["option"] == 6: # 切换下拉框 + self.switchSelect(node["parameters"], loopValue) + elif node["option"] == 7: # 鼠标移动到元素上 + self.moveToElement(node["parameters"], loopValue, loopPath, index) + elif node["option"] == 8: # 循环 + self.loopExecute(node, loopValue, loopPath, index) # 执行循环 + elif node["option"] == 9: # 条件分支 + self.judgeExecute(node, loopValue, loopPath, index) + except Exception as e: + self.print_and_log("执行节点<" + node["title"] + ">时出错,将继续执行,错误为:", e) + self.print_and_log("Error executing node <" + node["title"] + ">, will continue to execute, error is:", e) + # 执行完之后进行等待 if node["option"] != 0 and node["option"] != 2: # 点击元素操作单独定义等待时间操作 @@ -504,11 +1024,9 @@ def executeNode(self, nodeId, loopValue="", loopPath="", index=0): time.sleep(waitTime) elif waitType == 1: # 随机等待时间 time.sleep(random.uniform(waitTime * 0.5, waitTime * 1.5)) - self.Log("Wait seconds after node executing: ", waitTime) self.event.wait() # 等待事件结束 # 对判断条件的处理 - def judgeExecute(self, node, loopElement, clickPath="", index=0): executeBranchId = 0 # 要执行的BranchId for i in node["sequence"]: @@ -521,42 +1039,57 @@ def judgeExecute(self, node, loopElement, clickPath="", index=0): try: bodyText = self.browser.find_element( By.CSS_SELECTOR, "body", iframe=cnode["parameters"]["iframe"]).text - if bodyText.find(cnode["parameters"]["value"]) >= 0: + value = replace_field_values( + cnode["parameters"]["value"], self.outputParameters, self) + if bodyText.find(value) >= 0: executeBranchId = i break except: # 找不到元素下一个条件 continue elif tType == 2: # 当前页面包含元素 try: - if self.browser.find_element(By.XPATH, cnode["parameters"]["value"], iframe=cnode["parameters"]["iframe"]): + xpath = replace_field_values( + cnode["parameters"]["value"], self.outputParameters, self) + if self.browser.find_element(By.XPATH, xpath, iframe=cnode["parameters"]["iframe"]): executeBranchId = i break except: # 找不到元素或者xpath写错了,下一个条件 continue elif tType == 3: # 当前循环元素包括文本 try: - if loopElement.text.find(cnode["parameters"]["value"]) >= 0: + value = replace_field_values( + cnode["parameters"]["value"], self.outputParameters, self) + if loopElement.text.find(value) >= 0: executeBranchId = i break except: # 找不到元素或者xpath写错了,下一个条件 continue elif tType == 4: # 当前循环元素包括元素 try: - if loopElement.find_element(By.XPATH, cnode["parameters"]["value"][1:]): + xpath = replace_field_values( + cnode["parameters"]["value"][1:], self.outputParameters, self) + if loopElement.find_element(By.XPATH, xpath): executeBranchId = i break except: # 找不到元素或者xpath写错了,下一个条件 continue - elif tType <= 7: # JS命令返回值 + elif tType <= 8: # JS命令返回值 if tType == 5: # JS命令返回值等于 output = self.execute_code( - 0, cnode["parameters"]["code"], cnode["parameters"]["waitTime"], iframe=cnode["parameters"]["iframe"]) + 0, cnode["parameters"]["code"], cnode["parameters"]["waitTime"], + iframe=cnode["parameters"]["iframe"]) elif tType == 6: # System output = self.execute_code( - 1, cnode["parameters"]["code"], cnode["parameters"]["waitTime"], iframe=cnode["parameters"]["iframe"]) + 1, cnode["parameters"]["code"], cnode["parameters"]["waitTime"], + iframe=cnode["parameters"]["iframe"]) elif tType == 7: # 针对当前循环项的JS命令返回值 output = self.execute_code( - 2, cnode["parameters"]["code"], cnode["parameters"]["waitTime"], loopElement, iframe=cnode["parameters"]["iframe"]) + 2, cnode["parameters"]["code"], cnode["parameters"]["waitTime"], loopElement, + iframe=cnode["parameters"]["iframe"]) + elif tType == 8: # 针对当前循环项的System命令返回值 + output = self.execute_code( + 6, cnode["parameters"]["code"], cnode["parameters"]["waitTime"], loopElement, + iframe=cnode["parameters"]["iframe"]) try: if output.find("rue") != -1: # 如果返回值中包含true code = 1 @@ -567,229 +1100,407 @@ def judgeExecute(self, node, loopElement, clickPath="", index=0): if code > 0: executeBranchId = i break - # rt.end() if executeBranchId != 0: self.executeNode(executeBranchId, loopElement, clickPath, index) + else: + self.recordLog( + "判断条件内所有条件分支的条件都不满足|None of the conditions in the judgment condition are met") + + def handleHistory(self, node, xpath, thisHistoryURL, thisHistoryLength, index, element=None, elements=None): + if self.history["index"] != thisHistoryLength and self.history["handle"] == self.browser.current_window_handle: # 如果执行完一次循环之后历史记录发生了变化,注意当前页面的判断 + difference = thisHistoryLength - self.history["index"] # 计算历史记录变化差值 + self.browser.execute_script('history.go(' + str(difference) + ')') # 回退历史记录 + # if node["parameters"]["historyWait"] > 2: # 回退后要等待的时间 + time.sleep(node["parameters"]["historyWait"]) + # else: + # time.sleep(2) + try: + self.browser.execute_script('window.stop()') + except: + pass + ti = 0 + # print("CURRENT URL:", self.browser.current_url) + # time.sleep(2) + # if self.browser.current_url.startswith("data:") or self.browser.current_url.startswith("chrome:"): + if self.browser.current_url != thisHistoryURL and self.history["index"] != thisHistoryLength and self.history["handle"] == self.browser.current_window_handle: + while self.browser.current_url != thisHistoryURL: # 如果执行完一次循环之后网址发生了变化 + try: + self.browser.execute_script("history.go(1)") # 如果是data:开头的网址,就前进一步 + except: # 超时的情况下 + pass + ti += 1 + if self.browser.current_url == thisHistoryURL or ti > thisHistoryLength: # 如果执行完一次循环之后网址发生了变化 + break + time.sleep(2) + if element == None: # 不固定元素列表 + element = self.browser.find_elements(By.XPATH, xpath, iframe=node["parameters"]["iframe"]) + else: # 固定元素列表 + element = self.browser.find_element(By.XPATH, xpath, iframe=node["parameters"]["iframe"]) + # if index > 0: + # index -= 1 # 如果是data:开头的网址,就要重试一次 + else: + if element == None: + element = elements + return index, element # 对循环的处理 def loopExecute(self, node, loopValue, clickPath="", index=0): time.sleep(0.1) # 第一次执行循环的时候强制等待1秒 - # self.Log("循环执行前等待0.1秒") - self.Log("Wait 0.1 second before loop") thisHandle = self.browser.current_window_handle # 记录本次循环内的标签页的ID - thisHistoryLength = self.browser.execute_script( - 'return history.length') # 记录本次循环内的history的length + try: + thisHistoryLength = self.browser.execute_script( + 'return history.length') # 记录本次循环内的history的length + except: + thisHistoryLength = 0 self.history["index"] = thisHistoryLength self.history["handle"] = thisHandle - if int(node["parameters"]["loopType"]) == 0: # 单个元素循环 + thisHistoryURL = self.browser.current_url + # 快速提取处理 + if node["parameters"]["quickExtractable"]: + self.browser.switch_to.default_content() # 切换到主页面 + tree = html.fromstring(self.browser.page_source) + if int(node["parameters"]["loopType"]) == 1: # 不固定元素列表 + baseXPath = replace_field_values(node["parameters"]["baseXPath"], self.outputParameters, self) + rows = tree.xpath(baseXPath) + elif int(node["parameters"]["loopType"]) == 2: # 固定元素列表 + rows = [] + for path in node["parameters"]["baseXPath"].split("\n"): + baseXPath = replace_field_values(path, self.outputParameters, self) + rows.extend(tree.xpath(baseXPath)) + + for row in rows: + if node["parameters"]["clear"] == 1: + self.clearOutputParameters() + for param in node["parameters"]["quickParams"]: + xpath = replace_field_values(param["xpath"], self.outputParameters, self) + content = row.xpath(xpath) + try: + content = ' '.join(result.strip() + for result in content if result.strip()) + # 链接或者图片的情况下,合并链接相对路径为绝对路径 + if param["nodeType"] == 2 or param["nodeType"] == 4: + base_url = self.browser.current_url + # 合并链接相对路径为绝对路径 + content = urljoin(base_url, content) + if len(content) == 0: + content = param["default"] + except: + content = param["default"] + self.outputParameters[param["name"]] = content + if node["parameters"]["newLine"]: + line = new_line(self.outputParameters, + self.maxViewLength, self.outputParametersRecord) + self.OUTPUT.append(line) + self.saveData() + elif int(node["parameters"]["loopType"]) == 0: # 单个元素循环 # 无跳转标签页操作 count = 0 # 执行次数 + bodyText = "-" while True: # do while循环 try: finished = False + if node["parameters"]["exitCount"] == 0: + # newBodyText = self.browser.find_element(By.XPATH, node["parameters"]["exitElement"], iframe=node["parameters"]["iframe"]).text + # 用find_elements获取所有匹配到的文本 + try: + exitElements = self.browser.find_elements(By.XPATH, node["parameters"]["exitElement"], iframe=node["parameters"]["iframe"]) + newBodyText = "" + for exitElement in exitElements: + newBodyText += exitElement.text + except Exception as e: + self.print_and_log(f"设定的退出循环元素:{node['parameters']['exitElement']}的文本无法获取,本次循环将不再检测元素文本是否变化,将会继续执行,为解决此问题,您可以修改检测元素文本不变的元素为其他元素,或者将循环次数设定为固定次数大于0的值。") + self.print_and_log(f"The text of the exit loop element set: {node['parameters']['exitElement']} cannot be obtained, this loop will no longer check whether the text of the element has changed, and will continue to execute. To solve this problem, you can modify the element whose text does not change to other elements, or set the number of loops to a fixed number greater than 0.") + self.print_and_log(e) + exitElements = [] + # newBodyText为随机文本,保证一直执行 + newBodyText = str(random.random()) + if node["parameters"]["iframe"]: # 如果标记了iframe + iframes = self.browser.find_elements( + By.CSS_SELECTOR, "iframe", iframe=False) + for iframe in iframes: + self.browser.switch_to.default_content() + self.browser.switch_to.frame(iframe) + iframe_text = super(self.browser.__class__, self.browser).find_element( + By.CSS_SELECTOR, "body").text # 用super调用父类的方法 + newBodyText += iframe_text + self.browser.switch_to.default_content() + if newBodyText == bodyText: # 如果页面内容无变化 + self.print_and_log("页面已检测不到新内容,停止循环。") + self.print_and_log( + "No new content detected on the page, stop loop.") + finished = True + break + else: + self.print_and_log("检测到页面变化,继续循环。") + self.print_and_log( + "Page changed detected, continue loop.") + bodyText = newBodyText + xpath = replace_field_values( + node["parameters"]["xpath"], self.outputParameters, self) + # self.recordLog("循环元素|Loop element:", xpath) element = self.browser.find_element( - By.XPATH, node["parameters"]["xpath"], iframe=node["parameters"]["iframe"]) + By.XPATH, xpath, iframe=node["parameters"]["iframe"]) for i in node["sequence"]: # 挨个执行操作 self.executeNode( - i, element, node["parameters"]["xpath"], 0) - if self.BREAK: # 如果有break操作,下面的操作不执行 + i, element, xpath, 0) + if self.BREAK or self.CONTINUE: # 如果有break操作,下面的操作不执行 + self.CONTINUE = False break - if self.BREAK: # 如果有break操作,退出循环 + if self.BREAK: # 如果有break操作,退出循环 self.BREAK = False finished = True break finished = True - self.Log("Click: ", node["parameters"]["xpath"]) - self.recordLog("Click:" + node["parameters"]["xpath"]) except NoSuchElementException: # except: - print("Single loop element not found: ", - node["parameters"]["xpath"]) - print("找不到要循环的单个元素: ", node["parameters"]["xpath"]) - self.recordLog( - "Single loop element not found: " + node["parameters"]["xpath"]) + self.print_and_log("Single loop element not found: ", + xpath) + self.print_and_log("找不到要循环的单个元素: ", xpath) for i in node["sequence"]: # 不带点击元素的把剩余的如提取数据的操作执行一遍 if node["option"] != 2: self.executeNode( - i, None, node["parameters"]["xpath"], 0) + i, None, xpath, 0) finished = True break # 如果找不到元素,退出循环 finally: if not finished: - print("\n\n-------Retrying-------\n\n") - self.Log("-------Retrying-------: ", - node["parameters"]["xpath"]) - self.recordLog("ClickNotFound:" + - node["parameters"]["xpath"]) + self.print_and_log("\n\n-------Retrying-------\n\n") + self.print_and_log("-------Retrying-------: ", + node["parameters"]["xpath"]) for i in node["sequence"]: # 不带点击元素的把剩余的如提取数据的操作执行一遍 if node["option"] != 2: self.executeNode( - i, None, node["parameters"]["xpath"], 0) + i, None, xpath, 0) break # 如果找不到元素,退出循环 count = count + 1 - self.Log("Page: ", count) - self.recordLog("Page:" + str(count)) - # print(node["parameters"]["exitCount"], "-------") + self.print_and_log("Page: ", count) + # self.print_and_log(node["parameters"]["exitCount"], "-------") if node["parameters"]["exitCount"] == count: # 如果达到设置的退出循环条件的话 break if int(node["parameters"]["breakMode"]) > 0: # 如果设置了退出循环的脚本条件 output = self.execute_code(int( - node["parameters"]["breakMode"]) - 1, node["parameters"]["breakCode"], node["parameters"]["breakCodeWaitTime"], iframe=node["parameters"]["iframe"]) + node["parameters"]["breakMode"]) - 1, node["parameters"]["breakCode"], + node["parameters"]["breakCodeWaitTime"], + iframe=node["parameters"]["iframe"]) code = get_output_code(output) if code <= 0: break elif int(node["parameters"]["loopType"]) == 1: # 不固定元素列表 try: + xpath = replace_field_values( + node["parameters"]["xpath"], self.outputParameters, self) elements = self.browser.find_elements(By.XPATH, - node["parameters"]["xpath"], iframe=node["parameters"]["iframe"]) + xpath, iframe=node["parameters"]["iframe"]) + # self.recordLog("循环元素|Loop element:", xpath) if len(elements) == 0: - print("Loop element not found: ", - node["parameters"]["xpath"]) - print("找不到循环元素: ", node["parameters"]["xpath"]) - self.recordLog("pathNotFound: " + - node["parameters"]["xpath"]) - for index in range(len(elements)): + self.print_and_log("Loop element not found: ", + xpath) + self.print_and_log("找不到循环元素:", xpath) + index = 0 + skipCount = node["parameters"]["skipCount"] + while index < len(elements): + if index < skipCount: + index += 1 + self.print_and_log("跳过第" + str(index) + "个元素") + self.print_and_log("Skip the " + str(index) + "th element") + continue + try: + element = elements[index] + element_text = element.text + except StaleElementReferenceException: # 如果元素已经失效,重试 + self.print_and_log("元素已失效,重新获取元素|Element has expired, reacquiring element") + elements = self.browser.find_elements(By.XPATH, + xpath, iframe=node["parameters"]["iframe"]) + element = elements[index] for i in node["sequence"]: # 挨个顺序执行循环里所有的操作 - self.executeNode(i, elements[index], - node["parameters"]["xpath"], index) - if self.BREAK: + self.executeNode(i, element, + xpath, index) + if self.BREAK or self.CONTINUE: # 如果有break操作,下面的操作不执行 + self.CONTINUE = False break if self.BREAK: self.BREAK = False break - if self.browser.current_window_handle != thisHandle: # 如果执行完一次循环之后标签页的位置发生了变化 - while True: # 一直关闭窗口直到当前标签页 - self.browser.close() # 关闭使用完的标签页 - self.browser.switch_to.window( - self.browser.window_handles[-1]) - if self.browser.current_window_handle == thisHandle: - break - if self.history["index"] != thisHistoryLength and self.history[ - "handle"] == self.browser.current_window_handle: # 如果执行完一次循环之后历史记录发生了变化,注意当前页面的判断 - difference = thisHistoryLength - \ - self.history["index"] # 计算历史记录变化差值 - self.browser.execute_script( - 'history.go(' + str(difference) + ')') # 回退历史记录 - # if node["parameters"]["historyWait"] > 2: # 回退后要等待的时间 - time.sleep(node["parameters"]["historyWait"]) - # else: - # time.sleep(2) - # 切换历史记录等待: - self.Log("Change history back time or:", - node["parameters"]["historyWait"]) - self.browser.execute_script('window.stop()') + try: + changed_handle = self.browser.current_window_handle != thisHandle + except: # 如果网页被意外关闭了的情况下 + self.browser.switch_to.window( + self.browser.window_handles[-1]) + changed_handle = self.browser.window_handles[-1] != thisHandle + if changed_handle: # 如果执行完一次循环之后标签页的位置发生了变化 + try: + while True: # 一直关闭窗口直到当前标签页 + self.browser.close() # 关闭使用完的标签页 + self.browser.switch_to.window( + self.browser.window_handles[-1]) + if self.browser.current_window_handle == thisHandle: + break + except Exception as e: + self.print_and_log("关闭标签页发生错误:", e) + self.print_and_log( + "Error occurred while closing tab: ", e) + index, elements = self.handleHistory(node, xpath, thisHistoryURL, thisHistoryLength, index, elements=elements) if int(node["parameters"]["breakMode"]) > 0: # 如果设置了退出循环的脚本条件 output = self.execute_code(int( - node["parameters"]["breakMode"]) - 1, node["parameters"]["breakCode"], node["parameters"]["breakCodeWaitTime"], iframe=node["parameters"]["iframe"]) + node["parameters"]["breakMode"]) - 1, node["parameters"]["breakCode"], + node["parameters"]["breakCodeWaitTime"], + iframe=node["parameters"]["iframe"]) code = get_output_code(output) if code <= 0: break + index = index + 1 except NoSuchElementException: - print("Loop element not found: ", node["parameters"]["xpath"]) - print("找不到循环元素: ", node["parameters"]["xpath"]) - self.recordLog("pathNotFound: " + node["parameters"]["xpath"]) + self.print_and_log("Loop element not found: ", xpath) + self.print_and_log("找不到循环元素:", xpath) except Exception as e: raise elif int(node["parameters"]["loopType"]) == 2: # 固定元素列表 # 千万不要忘了分割!! - for path in node["parameters"]["pathList"].split("\n"): + paths = node["parameters"]["pathList"].split("\n") + # for path in node["parameters"]["pathList"].split("\n"): + index = 0 + skipCount = node["parameters"]["skipCount"] + while index < len(paths): + if index < skipCount: + index += 1 + self.print_and_log("跳过第" + str(index) + "个元素") + self.print_and_log("Skip the " + str(index) + "th element") + continue + path = paths[index] try: + path = replace_field_values( + path, self.outputParameters, self) element = self.browser.find_element( By.XPATH, path, iframe=node["parameters"]["iframe"]) + # self.recordLog("循环元素|Loop element:", path) for i in node["sequence"]: # 挨个执行操作 self.executeNode(i, element, path, 0) - if self.BREAK: + if self.BREAK or self.CONTINUE: # 如果有break操作,下面的操作不执行 + self.CONTINUE = False break if self.BREAK: self.BREAK = False break - if self.browser.current_window_handle != thisHandle: # 如果执行完一次循环之后标签页的位置发生了变化 - while True: # 一直关闭窗口直到当前标签页 - self.browser.close() # 关闭使用完的标签页 - self.browser.switch_to.window( - self.browser.window_handles[-1]) - if self.browser.current_window_handle == thisHandle: - break - if self.history["index"] != thisHistoryLength and self.history[ - "handle"] == self.browser.current_window_handle: # 如果执行完一次循环之后历史记录发生了变化,注意当前页面的判断 - difference = thisHistoryLength - \ - self.history["index"] # 计算历史记录变化差值 - self.browser.execute_script( - 'history.go(' + str(difference) + ')') # 回退历史记录 - # if node["parameters"]["historyWait"] > 2: # 回退后要等待的时间 - time.sleep(node["parameters"]["historyWait"]) - # else: - # time.sleep(2) - self.Log("Change history back time or:", - node["parameters"]["historyWait"]) - self.browser.execute_script('window.stop()') + try: + changed_handle = self.browser.current_window_handle != thisHandle + except: # 如果网页被意外关闭了的情况下 + self.browser.switch_to.window( + self.browser.window_handles[-1]) + changed_handle = self.browser.window_handles[-1] != thisHandle + if changed_handle: # 如果执行完一次循环之后标签页的位置发生了变化 + try: + while True: # 一直关闭窗口直到当前标签页 + self.browser.close() # 关闭使用完的标签页 + self.browser.switch_to.window( + self.browser.window_handles[-1]) + if self.browser.current_window_handle == thisHandle: + break + except Exception as e: + self.print_and_log("关闭标签页发生错误:", e) + self.print_and_log( + "Error occurred while closing tab: ", e) + index, element = self.handleHistory(node, path, thisHistoryURL, thisHistoryLength, index, element=element) except NoSuchElementException: - print("Loop element not found: ", path) - print("找不到循环元素: ", path) - self.recordLog("pathNotFound: " + path) + self.print_and_log("Loop element not found: ", path) + self.print_and_log("找不到循环元素:", path) + index += 1 continue # 循环中找不到元素就略过操作 except Exception as e: raise if int(node["parameters"]["breakMode"]) > 0: # 如果设置了退出循环的脚本条件 output = self.execute_code(int( - node["parameters"]["breakMode"]) - 1, node["parameters"]["breakCode"], node["parameters"]["breakCodeWaitTime"], iframe=node["parameters"]["iframe"]) + node["parameters"]["breakMode"]) - 1, node["parameters"]["breakCode"], + node["parameters"]["breakCodeWaitTime"], + iframe=node["parameters"]["iframe"]) code = get_output_code(output) if code <= 0: break + index = index + 1 elif int(node["parameters"]["loopType"]) == 3: # 固定文本列表 textList = node["parameters"]["textList"].split("\n") + if len(textList) == 1: # 如果固定文本列表只有一行,现在就可以替换变量 + textList = replace_field_values( + node["parameters"]["textList"], self.outputParameters, self).split("\n") + skipCount = node["parameters"]["skipCount"] + index = 0 for text in textList: - self.recordLog("input: " + text) + if index < skipCount: + index += 1 + self.print_and_log("跳过第" + str(index) + "个文本") + self.print_and_log("Skip the " + str(index) + "th text") + continue + text = replace_field_values(text, self.outputParameters, self) + # self.recordLog("当前循环文本|Current loop text:", text) for i in node["sequence"]: # 挨个执行操作 self.executeNode(i, text, "", 0) - if self.BREAK: + if self.BREAK or self.CONTINUE: # 如果有break操作,下面的操作不执行 + self.CONTINUE = False break if self.BREAK: self.BREAK = False break if int(node["parameters"]["breakMode"]) > 0: # 如果设置了退出循环的脚本条件 output = self.execute_code(int( - node["parameters"]["breakMode"]) - 1, node["parameters"]["breakCode"], node["parameters"]["breakCodeWaitTime"], iframe=node["parameters"]["iframe"]) + node["parameters"]["breakMode"]) - 1, node["parameters"]["breakCode"], + node["parameters"]["breakCodeWaitTime"], + iframe=node["parameters"]["iframe"]) code = get_output_code(output) if code <= 0: break elif int(node["parameters"]["loopType"]) == 4: # 固定网址列表 # tempList = node["parameters"]["textList"].split("\r\n") urlList = list( - filter(isnull, node["parameters"]["textList"].split("\n"))) # 去空行 - # urlList = [] - # for url in tempList: - # if url != "": - # urlList.append(url) + filter(isnotnull, node["parameters"]["textList"].split("\n"))) # 去空行 + if len(urlList) == 1: # 如果固定网址列表只有一行,现在就可以替换变量 + urlList = replace_field_values( + node["parameters"]["textList"], self.outputParameters, self).split("\n") + skipCount = node["parameters"]["skipCount"] + index = 0 for url in urlList: - self.recordLog("input: " + url) + if index < skipCount: + index += 1 + self.print_and_log("跳过第" + str(index) + "个网址") + self.print_and_log("Skip the " + str(index) + "th url") + continue + url = replace_field_values(url, self.outputParameters, self) + # self.recordLog("当前循环网址|Current loop url:", url) for i in node["sequence"]: self.executeNode(i, url, "", 0) - if self.BREAK: + if self.BREAK or self.CONTINUE: # 如果有break操作,下面的操作不执行 + self.CONTINUE = False break if self.BREAK: self.BREAK = False break if int(node["parameters"]["breakMode"]) > 0: # 如果设置了退出循环的脚本条件 output = self.execute_code(int( - node["parameters"]["breakMode"]) - 1, node["parameters"]["breakCode"], node["parameters"]["breakCodeWaitTime"], iframe=node["parameters"]["iframe"]) + node["parameters"]["breakMode"]) - 1, node["parameters"]["breakCode"], + node["parameters"]["breakCodeWaitTime"], + iframe=node["parameters"]["iframe"]) code = get_output_code(output) if code <= 0: break - elif int(node["parameters"]["loopType"]) <= 6: # 命令返回值 + elif int(node["parameters"]["loopType"]) <= 7: # 命令返回值 while True: # do while循环 if int(node["parameters"]["loopType"]) == 5: # JS output = self.execute_code( - 0, node["parameters"]["code"], node["parameters"]["waitTime"], iframe=node["parameters"]["iframe"]) + 0, node["parameters"]["code"], node["parameters"]["waitTime"], + iframe=node["parameters"]["iframe"]) elif int(node["parameters"]["loopType"]) == 6: # System output = self.execute_code( - 1, node["parameters"]["code"], node["parameters"]["waitTime"], iframe=node["parameters"]["iframe"]) + 1, node["parameters"]["code"], node["parameters"]["waitTime"], + iframe=node["parameters"]["iframe"]) + elif int(node["parameters"]["loopType"]) == 7: # Python + output = self.execute_code( + 6, node["parameters"]["code"], node["parameters"]["waitTime"], + iframe=node["parameters"]["iframe"]) code = get_output_code(output) if code <= 0: break for i in node["sequence"]: # 挨个执行操作 self.executeNode(i, code, node["parameters"]["xpath"], 0) - if self.BREAK: + if self.BREAK or self.CONTINUE: # 如果有break操作,下面的操作不执行 + self.CONTINUE = False break if self.BREAK: self.BREAK = False @@ -798,13 +1509,16 @@ def loopExecute(self, node, loopValue, clickPath="", index=0): self.history["handle"] = self.browser.current_window_handle self.scrollDown(node["parameters"]) - # 打开网页事件 + # 打开网页操作 def openPage(self, param, loopValue): time.sleep(1) # 打开网页后强行等待至少1秒 if len(self.browser.window_handles) > 1: self.browser.switch_to.window( self.browser.window_handles[-1]) # 打开网页操作从第1个页面开始 - self.browser.close() + try: + self.browser.close() + except: + pass self.browser.switch_to.window( self.browser.window_handles[0]) # 打开网页操作从第1个页面开始 self.history["handle"] = self.browser.current_window_handle @@ -815,16 +1529,10 @@ def openPage(self, param, loopValue): # clear output parameters for key in self.outputParameters: self.outputParameters[key] = "" - else: - url = list(filter(isnull, param["links"].split("\n")))[0] + else: # 在流程图其他位置设置了打开网页的操作,读取的应该是第一个网址,如打开网页后登录,再打开第二个网页 + url = list(filter(isnotnull, param["links"].split("\n")))[0] # 将value中的Field[""]替换为outputParameters中的键值 - pattern = r'Field\["([^"]+)"\]' - try: - replaced_text = re.sub( - pattern, lambda match: self.outputParameters.get(match.group(1), ''), url) - except: - replaced_text = url - url = replaced_text + url = replace_field_values(url, self.outputParameters, self) try: maxWaitTime = int(param["maxWaitTime"]) except: @@ -841,19 +1549,16 @@ def openPage(self, param, loopValue): cookie_dict = {'name': name, 'value': value} # 加载 cookie self.browser.add_cookie(cookie_dict) - self.Log('Loading page: ' + url) - self.recordLog('Loading page: ' + url) + self.print_and_log('加载页面|Loading page: ' + url) except TimeoutException: - self.Log('Time out after set seconds when loading page: ' + url) - self.recordLog( + self.print_and_log( 'Time out after set seconds when loading page: ' + url) try: self.browser.execute_script('window.stop()') except: pass except Exception as e: - print("Failed to load page: " + url) - self.recordLog('Failed to load page: ' + url) + self.print_and_log("Failed to load page: " + url) try: self.history["index"] = self.browser.execute_script( "return history.length") @@ -864,15 +1569,19 @@ def openPage(self, param, loopValue): "return history.length") except: self.history["index"] = 0 + except Exception as e: + self.print_and_log("History Length Error") + self.history["index"] = 0 self.scrollDown(param) # 控制屏幕向下滚动 - # 键盘输入事件 + # 键盘输入操作 def inputInfo(self, param, loopValue): time.sleep(0.1) # 输入之前等待0.1秒 - self.Log("Wait 0.1 second before input") try: + xpath = replace_field_values( + param["xpath"], self.outputParameters, self) textbox = self.browser.find_element( - By.XPATH, param["xpath"], iframe=param["iframe"]) + By.XPATH, xpath, iframe=param["iframe"]) # textbox.send_keys(Keys.CONTROL, 'a') # textbox.send_keys(Keys.BACKSPACE) self.execute_code( @@ -889,28 +1598,36 @@ def inputInfo(self, param, loopValue): else: value = param["value"] # 将value中的Field[""]替换为outputParameters中的键值 - pattern = r'Field\["([^"]+)"\]' + # pattern = r'Field\["([^"]+)"\]' try: - replaced_text = re.sub( - pattern, lambda match: self.outputParameters.get(match.group(1), ''), value) + # replaced_text = re.sub( + # pattern, lambda match: self.outputParameters.get(match.group(1), ''), value) + replaced_text = replace_field_values(value, self.outputParameters, self) replaced_text = re.sub( '', '', replaced_text, flags=re.IGNORECASE) except: replaced_text = value + index = param["index"] + if index != 0: + try: + replaced_text = replaced_text.split("~")[index - 1] + except: + self.print_and_log("取值失败,可能是因为取值索引超出范围,将使用整个文本值") + self.print_and_log( + "Failed to get value, maybe because the index is out of range, will use the entire text value") textbox.send_keys(replaced_text) if value.lower().find("") >= 0: textbox.send_keys(Keys.ENTER) + self.recordLog("输入文字|Input text: " + + replaced_text + " to " + xpath) self.execute_code( 2, param["afterJS"], param["afterJSWaitTime"], textbox, iframe=param["iframe"]) # 执行后置js except: - print("Cannot find input box element:" + - param["xpath"] + ", please try to set the wait time before executing this operation") - print("找不到输入框元素:" + param["xpath"] + ",请尝试在执行此操作前设置等待时间") - self.recordLog("Cannot find input box element:" + - param["xpath"] + "Please try to set the wait time before executing this operation") - - # 点击元素事件 + self.print_and_log("Cannot find input box element:" + + xpath + ", please try to set the wait time before executing this operation") + self.print_and_log("找不到输入框元素:" + xpath + ",请尝试在执行此操作前设置等待时间") + # 点击元素操作 def clickElement(self, param, loopElement=None, clickPath="", index=0): try: maxWaitTime = int(param["maxWaitTime"]) @@ -922,12 +1639,25 @@ def clickElement(self, param, loopElement=None, clickPath="", index=0): try: # element = self.browser.find_element( # By.XPATH, path, iframe=param["iframe"]) - if param["useLoop"]: # 使用循环的情况下,传入的clickPath就是实际的xpath - path = clickPath + clickPath = replace_field_values( + clickPath, self.outputParameters, self) + xpath = replace_field_values( + param["xpath"], self.outputParameters, self) + if xpath.find("point(") >= 0: # 如果xpath中包含point(),说明是相对坐标的点击 + index = 0 + path = "//body" + elif param["useLoop"]: # 使用循环的情况下,传入的clickPath就是实际的xpath + if xpath == "": + path = clickPath + else: + path = "(" + clickPath + ")" + \ + "[" + str(index + 1) + "]" + \ + xpath + index = 0 # 如果是相对循环内元素的点击,在定位到元素后,index应该重置为0 # element = loopElement else: index = 0 - path = param["xpath"] # 不然使用元素定义的xpath + path = xpath # 不然使用元素定义的xpath # element = self.browser.find_element( # By.XPATH, path, iframe=param["iframe"]) elements = self.browser.find_elements( @@ -937,35 +1667,84 @@ def clickElement(self, param, loopElement=None, clickPath="", index=0): self.execute_code(2, param["beforeJS"], param["beforeJSWaitTime"], element, iframe=param["iframe"]) except: - print("Cannot find element:" + - path + ", please try to set the wait time before executing this operation") - print("找不到要点击的元素:" + path + ",请尝试在执行此操作前设置等待时间") - self.recordLog("Cannot find element:" + - path + ", please try to set the wait time before executing this operation") + self.print_and_log("Cannot find element:" + + path + ", please try to set the wait time before executing this operation") + self.print_and_log("找不到要点击的元素:" + path + ",请尝试在执行此操作前设置等待时间") tempHandleNum = len(self.browser.window_handles) # 记录之前的窗口位置 try: click_way = int(param["clickWay"]) except: click_way = 0 try: - if click_way == 0: # 用selenium的点击方法 - actions = ActionChains(self.browser) # 实例化一个action对象 - actions.click(element).perform() + newTab = int(param["newTab"]) + except: + newTab = 0 + try: + if xpath.find("point(") >= 0: # 如果xpath中包含point(),说明是相对坐标的点击 + point = xpath.split("point(")[1].split(")")[0].split(",") + x = int(point[0]) + y = int(point[1]) + # try: + # actions = ActionChains(self.browser) # 实例化一个action对象 + # actions.move_to_element(element).perform() + # actions.move_by_offset(x, y).perform() + # actions.click().perform() + # except Exception as e: + script = "document.elementFromPoint(" + str(x) + "," + str(y) + ").click();" + self.browser.execute_script(script) + elif click_way == 0: # 用selenium的点击方法 + try: + actions = ActionChains(self.browser) # 实例化一个action对象 + if newTab == 1: # 在新标签页打开 + # Ctrl + Click + actions.key_down(Keys.CONTROL).click(element).key_up(Keys.CONTROL).perform() + else: + actions.click(element).perform() + except Exception as e: + self.browser.execute_script("arguments[0].scrollIntoView();", element) + try: + actions = ActionChains(self.browser) # 实例化一个action对象 + actions.click(element).perform() + except Exception as e: + self.print_and_log(f"Selenium点击元素{path}失败,将尝试使用JavaScript点击") + self.print_and_log(f"Failed to click element {path} with Selenium, will try to click with JavaScript") + script = 'var result = document.evaluate(`' + path + \ + '`, document, null, XPathResult.ANY_TYPE, null);for(let i=0;i 0: + try: + time.sleep(1.5) + alert = self.browser.switch_to.alert + alertHandleType = int(param["alertHandleType"]) + if alertHandleType == 1: + alert.accept() + self.print_and_log("已点击确认|Clicked OK") + elif alertHandleType == 2: + alert.dismiss() + self.print_and_log("已点击取消|Clicked Cancel") + except Exception as e: + self.print_and_log("找不到弹窗|Cannot find alert") + # 点击后对该元素执行一段JavaScript代码 try: if param["afterJS"] != "": @@ -974,10 +1753,8 @@ def clickElement(self, param, loopElement=None, clickPath="", index=0): self.execute_code(2, param["afterJS"], param["afterJSWaitTime"], element, iframe=param["iframe"]) except: - print("Cannot find element:" + path) - self.recordLog("Cannot find element:" + - path + ", please try to set the wait time before executing this operation") - print("找不到要点击的元素:" + path + ",请尝试在执行此操作前设置等待时间") + self.print_and_log("Cannot find element:" + path) + self.print_and_log("找不到要点击的元素:" + path + ",请尝试在执行此操作前设置等待时间") waitTime = float(param["wait"]) + 0.01 # 点击之后等待 try: waitType = int(param["waitType"]) @@ -995,18 +1772,30 @@ def clickElement(self, param, loopElement=None, clickPath="", index=0): self.history["index"] = self.browser.execute_script( "return history.length") except TimeoutException: - self.browser.execute_script('window.stop()') + try: + self.browser.execute_script('window.stop()') + except: + pass self.history["index"] = self.browser.execute_script( "return history.length") + except Exception as e: + self.print_and_log("History Length Error") + self.history["index"] = 0 else: try: self.history["index"] = self.browser.execute_script( "return history.length") except TimeoutException: - self.browser.execute_script('window.stop()') + try: + self.browser.execute_script('window.stop()') + except: + pass self.history["index"] = self.browser.execute_script( "return history.length") # 如果打开了新窗口,切换到新窗口 + except Exception as e: + self.print_and_log("History Length Error") + self.history["index"] = 0 self.scrollDown(param) # 根据参数配置向下滚动 # rt.end() @@ -1034,10 +1823,14 @@ def get_content(self, p, element): except: downloadPic = 0 if downloadPic == 1: - download_image(content, "Data/Task_" + - str(self.id) + "/" + self.saveName + "/") + download_image(self, content, "Data/Task_" + + str(self.id) + "/" + self.saveName + "/", element) else: # 普通节点 - content = element.text + if p["splitLine"] == 1: + text = extract_text_from_html(element.get_attribute('outerHTML')) + content = split_text_by_lines(text) + else: + content = element.text elif p["contentType"] == 1: # 只采集当期元素下的文本,不包括子元素 if p["nodeType"] == 2: if element.get_attribute("href") != None: @@ -1059,8 +1852,8 @@ def get_content(self, p, element): except: downloadPic = 0 if downloadPic == 1: - download_image(content, "Data/Task_" + - str(self.id) + "/" + self.saveName + "/") + download_image(self, content, "Data/Task_" + + str(self.id) + "/" + self.saveName + "/", element) else: command = 'var arr = [];\ var content = arguments[0];\ @@ -1089,44 +1882,70 @@ def get_content(self, p, element): content = self.browser.title elif p["contentType"] == 7: # 获取整个网页的高度和宽度 - height = self.browser.execute_script( - "return document.body.scrollHeight") - width = self.browser.execute_script( - "return document.body.scrollWidth") + size = self.browser.get_window_size() + width = size["width"] + height = size["height"] # 调整浏览器窗口的大小 self.browser.set_window_size(width, height) element.screenshot("Data/Task_" + str(self.id) + "/" + self.saveName + "/" + str(time.time()) + ".png") + # 截图完成后,将浏览器的窗口大小设置为原来的大小 + self.browser.set_window_size(width, height) elif p["contentType"] == 8: try: + size = self.browser.get_window_size() + width = size["width"] + height = size["height"] screenshot = element.screenshot_as_png screenshot_stream = io.BytesIO(screenshot) # 使用Pillow库打开截图,并转换为灰度图像 image = Image.open(screenshot_stream).convert('L') + temp_name = "OCR_" + str(time.time()) + ".png" + location = "Data/Task_" + \ + str(self.id) + "/" + self.saveName + "/" + temp_name + image.save(location) + ocr = DdddOcr(show_ad=False) + with open(location, 'rb') as f: + image_bytes = f.read() + content = ocr.classification(image_bytes) + os.remove(location) + self.browser.set_window_size(width, height) # 使用Tesseract OCR引擎识别图像中的文本 - text = pytesseract.image_to_string(image, lang='chi_sim+eng') - content = text + # content = pytesseract.image_to_string(image, lang='chi_sim+eng') except Exception as e: + # try: + # self.print_and_log(e) + # self.print_and_log("识别中文失败,尝试只识别英文") + # self.print_and_log("Failed to recognize Chinese, try to recognize English only") + # screenshot = element.screenshot_as_png + # screenshot_stream = io.BytesIO(screenshot) + # # 使用Pillow库打开截图,并转换为灰度图像 + # image = Image.open(screenshot_stream).convert('L') + # # 使用Tesseract OCR引擎识别图像中的文本 + # # content = pytesseract.image_to_string(image, lang='eng') + # except Exception as e: content = "OCR Error" - print("To use OCR, You need to install Tesseract-OCR and add it to the environment variable PATH (need to restart EasySpider after you put in PATH): https://tesseract-ocr.github.io/tessdoc/Installation.html") - if sys.platform == "win32": - print("要使用OCR识别功能,你需要安装Tesseract-OCR并将其添加到环境变量PATH中(添加后需重启EasySpider):https://blog.csdn.net/u010454030/article/details/80515501\nhttps://www.bilibili.com/video/BV1xz4y1b72D/") - elif sys.platform == "darwin": - print(e) - print( - "注意以上错误,要使用OCR识别功能,你需要安装Tesseract-OCR并将其添加到环境变量PATH中(添加后需重启EasySpider):https://zhuanlan.zhihu.com/p/146044810") - elif sys.platform == "linux": - print(e) - print( - "注意以上错误,要使用OCR识别功能,你需要安装Tesseract-OCR并将其添加到环境变量PATH中(添加后需重启EasySpider):https://zhuanlan.zhihu.com/p/420259031") - else: - print(e) - print("注意以上错误,要使用OCR识别功能,你需要安装Tesseract-OCR并将其添加到环境变量PATH中(添加后需重启EasySpider):https://blog.csdn.net/u010454030/article/details/80515501\nhttps://www.bilibili.com/video/BV1xz4y1b72D/") + self.print_and_log(e) + # if sys.platform == "win32": + # self.print_and_log("要使用OCR识别功能,你需要安装Tesseract-OCR并将其添加到环境变量PATH中(添加后需重启EasySpider):https://blog.csdn.net/u010454030/article/details/80515501") + # self.print_and_log("\nhttps://www.bilibili.com/video/BV1GP411y7u4/") + # elif sys.platform == "darwin": + # self.print_and_log( + # "注意以上错误,要使用OCR识别功能,你需要安装Tesseract-OCR并将其添加到环境变量PATH中(添加后需重启EasySpider):https://zhuanlan.zhihu.com/p/146044810") + # elif sys.platform == "linux": + # self.print_and_log( + # "注意以上错误,要使用OCR识别功能,你需要安装Tesseract-OCR并将其添加到环境变量PATH中(添加后需重启EasySpider):https://zhuanlan.zhihu.com/p/420259031") + # else: + # self.print_and_log("注意以上错误,要使用OCR识别功能,你需要安装Tesseract-OCR并将其添加到环境变量PATH中(添加后需重启EasySpider):https://blog.csdn.net/u010454030/article/details/80515501") + # self.print_and_log("\nhttps://www.bilibili.com/video/BV1GP411y7u4/") + # self.print_and_log("To use OCR, You need to install Tesseract-OCR and add it to the environment variable PATH (need to restart EasySpider after you put in PATH): https://tesseract-ocr.github.io/tessdoc/Installation.html") elif p["contentType"] == 9: content = self.execute_code( 2, p["JS"], p["JSWaitTime"], element, iframe=p["iframe"]) - elif p["contentType"] == 12: # 系统命令返回值 + elif p["contentType"] == 12: # 系统命令返回值 content = self.execute_code(1, p["JS"], p["JSWaitTime"]) + elif p["contentType"] == 13: # eval返回值 + content = self.execute_code(6, p["JS"], p["JSWaitTime"]) elif p["contentType"] == 10: # 下拉框选中的值 try: select_element = Select(element) @@ -1140,10 +1959,27 @@ def get_content(self, p, element): content = select_element.first_selected_option.text except: content = "" + elif p["contentType"] == 14: # 元素属性值 + attribute_name = p["JS"] + try: + content = element.get_attribute(attribute_name) + except: + content = "" + if content == None: + content = "" return content - # 提取数据事件 + def clearOutputParameters(self): + for key in self.outputParameters: + self.outputParameters[key] = "" + self.recordLog("清空输出参数|Clear output parameters") + + # 提取数据操作 def getData(self, param, loopElement, isInLoop=True, parentPath="", index=0): + parentPath = replace_field_values( + parentPath, self.outputParameters, self) + if param["clear"] == 1: + self.clearOutputParameters() try: pageHTML = etree.HTML(self.browser.page_source) except: @@ -1166,36 +2002,57 @@ def getData(self, param, loopElement, isInLoop=True, parentPath="", index=0): for p in param["params"]: if p["optimizable"]: try: + relativeXPath = replace_field_values( + p["relativeXPath"], self.outputParameters, self) # 只有当前环境不变变化才可以快速提取数据 if self.browser.iframe_env != p["iframe"]: + # if p["iframe"] or self.browser.iframe_env != p["iframe"]: # 如果是iframe,则不能快速提取数据,主要是各个上下文的iframe切换,但一般不会有人这么做 p["optimizable"] = False continue - # p["relativeXPath"] = p["relativeXPath"].lower() - # p["relativeXPath"] = lowercase_tags_in_xpath(p["relativeXPath"]) + # relativeXPath = relativeXPath.lower() + # relativeXPath = lowercase_tags_in_xpath(relativeXPath) # 已经有text()或@href了,不需要再加 - if p["relativeXPath"].find("/@href") >= 0 or p["relativeXPath"].find("/text()") >= 0 or p["relativeXPath"].find("::text()") >= 0: - xpath = p["relativeXPath"] + content_type = "" + if relativeXPath.find("/@href") >= 0 or relativeXPath.find("/text()") >= 0 or relativeXPath.find( + "::text()") >= 0: + content_type = "" elif p["nodeType"] == 2: - xpath = p["relativeXPath"] + "/@href" + content_type = "//@href" + elif p["nodeType"] == 4: + content_type = "//@src" elif p["contentType"] == 1: - xpath = p["relativeXPath"] + "/text()" + content_type = "/text()" elif p["contentType"] == 0: - xpath = p["relativeXPath"] + "//text()" + content_type = "//text()" + xpath = relativeXPath + content_type if p["relative"]: - # if p["relativeXPath"] == "": + # if relativeXPath == "": # content = [loopElementHTML] # else: # 如果字串里有//即子孙查找,则不动语句 - if p["relativeXPath"].find("//") >= 0: - full_path = "(" + parentPath + \ - xpath + ")" + \ - "[" + str(index + 1) + "]" - content = pageHTML.xpath(full_path) + if relativeXPath.find("//") >= 0: + if xpath.startswith("/"): + full_path = "(" + parentPath + ")" + \ + "[" + str(index + 1) + "]" + \ + relativeXPath + content_type + else: # 如果是id()这种形式,不需要包parentPath + full_path = xpath + try: + content = pageHTML.xpath(full_path) + except: + content = [] + # 如果是id()这种形式,不需要包/html/body + elif not relativeXPath.startswith("/"): + try: + content = loopElementHTML.xpath(xpath) + except: + content = [] else: content = loopElementHTML.xpath( "/html/body/" + loopElementHTML[0][0].tag + xpath) else: - if xpath.find("/body") < 0: + # 如果是id()或(//div)[1]这种形式,不需要包/html/body + if xpath.find("/body") < 0 and xpath.startswith("/"): xpath = "/html/body" + xpath content = pageHTML.xpath(xpath) if len(content) > 0: @@ -1203,57 +2060,66 @@ def getData(self, param, loopElement, isInLoop=True, parentPath="", index=0): # 拼接所有文本内容并去掉两边的空白 content = ' '.join(result.strip() for result in content if result.strip()) - if p["nodeType"] == 2: + if p["nodeType"] == 2 or p["nodeType"] == 4: base_url = self.browser.current_url - content = urljoin(base_url, content) # 合并链接相对路径为绝对路径 + # 合并链接相对路径为绝对路径 + content = urljoin(base_url, content) else: content = p["default"] if not self.dataNotFoundKeys[p["name"]]: - print('Element %s not found with parameter name %s when extracting data, use default, this error will only show once' % ( - p["relativeXPath"], p["name"])) - print("提取数据操作时,字段名 %s 对应XPath %s 未找到,使用默认值,本字段将不再重复报错" % ( - p["name"], p["relativeXPath"])) + self.print_and_log( + 'Element %s not found with parameter name %s when extracting data, use default, this error will only show once' % ( + relativeXPath, p["name"])) + self.print_and_log( + "提取数据操作时,字段名 %s 对应XPath %s 未找到,使用默认值,本字段将不再重复报错" % ( + p["name"], relativeXPath)) self.dataNotFoundKeys[p["name"]] = True - self.recordLog( - 'Element %s not found, use default' % p["relativeXPath"]) except Exception as e: if not self.dataNotFoundKeys[p["name"]]: - print('Element %s not found with parameter name %s when extracting data, use default, this error will only show once' % ( - p["relativeXPath"], p["name"])) - print("提取数据操作时,字段名 %s 对应XPath %s 未找到(请查看原因,如是否翻页太快页面元素未加载出来),使用默认值,本字段将不再重复报错" % ( - p["name"], p["relativeXPath"])) + self.print_and_log( + 'Element %s not found with parameter name %s when extracting data, use default, this error will only show once' % ( + relativeXPath, p["name"])) + self.print_and_log( + "提取数据操作时,字段名 %s 对应XPath %s 未找到(请查看原因,如是否翻页太快页面元素未加载出来),使用默认值,本字段将不再重复报错" % ( + p["name"], relativeXPath)) self.dataNotFoundKeys[p["name"]] = True - self.recordLog( - 'Element %s not found, use default' % p["relativeXPath"]) - self.outputParameters[p["name"]] = content - + try: + self.outputParameters[p["name"]] = content + except: + self.outputParameters[p["name"]] = p["default"] # 对于不能优化的操作,使用selenium执行 for p in param["params"]: if not p["optimizable"]: content = "" + relativeXPath = replace_field_values( + p["relativeXPath"], self.outputParameters, self) if not (p["contentType"] == 5 or p["contentType"] == 6): # 如果不是页面标题或URL,去找元素 try: - # p["relativeXPath"] = p["relativeXPath"].lower() - # p["relativeXPath"] = lowercase_tags_in_xpath(p["relativeXPath"]) + # relativeXPath = relativeXPath.lower() + # relativeXPath = lowercase_tags_in_xpath(relativeXPath) if p["relative"]: # 是否相对xpath - if p["relativeXPath"] == "": # 相对xpath有时候就是元素本身,不需要二次查找 + if relativeXPath == "": # 相对xpath有时候就是元素本身,不需要二次查找 element = loopElement else: # 如果字串里有//即子孙查找,则不动语句 - if p["relativeXPath"].find("//") >= 0: - full_path = "(" + parentPath + \ - p["relativeXPath"] + ")" + \ - "[" + str(index + 1) + "]" + if relativeXPath.find("//") >= 0: + # full_path = "(" + parentPath + \ + # relativeXPath + ")" + \ + # "[" + str(index + 1) + "]" + full_path = "(" + parentPath + ")" + \ + "[" + str(index + 1) + "]" + \ + relativeXPath element = self.browser.find_element( By.XPATH, full_path, iframe=p["iframe"]) else: element = loopElement.find_element(By.XPATH, - p["relativeXPath"][1:]) + relativeXPath[1:]) else: element = self.browser.find_element( - By.XPATH, p["relativeXPath"], iframe=p["iframe"]) - except (NoSuchElementException, InvalidSelectorException, StaleElementReferenceException): # 找不到元素的时候,使用默认值 - # print(p) + By.XPATH, relativeXPath, iframe=p["iframe"]) + except ( + NoSuchElementException, InvalidSelectorException, StaleElementReferenceException) as e: # 找不到元素的时候,使用默认值 + # self.print_and_log(p) try: content = p["default"] except Exception as e: @@ -1261,30 +2127,32 @@ def getData(self, param, loopElement, isInLoop=True, parentPath="", index=0): self.outputParameters[p["name"]] = content try: if not self.dataNotFoundKeys[p["name"]]: - print('Element %s not found with parameter name %s when extracting data, use default, this error will only show once' % ( - p["relativeXPath"], p["name"])) - print("提取数据操作时,字段名 %s 对应XPath %s 未找到,使用默认值,本字段将不再重复报错" % ( - p["name"], p["relativeXPath"])) + self.print_and_log( + 'Element %s not found with parameter name %s when extracting data, use default, this error will only show once' % ( + relativeXPath, p["name"])) + self.print_and_log( + "提取数据操作时,字段名 %s 对应XPath %s 未找到,使用默认值,本字段将不再重复报错" % ( + p["name"], relativeXPath)) self.dataNotFoundKeys[p["name"]] = True - self.recordLog( - 'Element %s not found, use default' % p["relativeXPath"]) except: pass continue except TimeoutException: # 超时的时候设置超时值 - self.Log('Time out after set seconds when getting data') - self.recordLog( + self.print_and_log( 'Time out after set seconds when getting data') - self.browser.execute_script('window.stop()') + try: + self.browser.execute_script('window.stop()') + except: + pass if p["relative"]: # 是否相对xpath - if p["relativeXPath"] == "": # 相对xpath有时候就是元素本身,不需要二次查找 + if relativeXPath == "": # 相对xpath有时候就是元素本身,不需要二次查找 element = loopElement else: element = loopElement.find_element(By.XPATH, - p["relativeXPath"][1:]) + relativeXPath[1:]) else: element = self.browser.find_element( - By.XPATH, p["relativeXPath"], iframe=p["iframe"]) + By.XPATH, relativeXPath, iframe=p["iframe"]) # rt.end() else: element = self.browser.find_element( @@ -1295,42 +2163,42 @@ def getData(self, param, loopElement, isInLoop=True, parentPath="", index=0): content = self.get_content(p, element) except StaleElementReferenceException: # 发生找不到元素的异常后,等待几秒重新查找 self.recordLog( - 'StaleElementReferenceException: '+p["relativeXPath"]) + 'StaleElementReferenceException: ' + relativeXPath) time.sleep(3) try: if p["relative"]: # 是否相对xpath - if p["relativeXPath"] == "": # 相对xpath有时候就是元素本身,不需要二次查找 + if relativeXPath == "": # 相对xpath有时候就是元素本身,不需要二次查找 element = loopElement self.recordLog( 'StaleElementReferenceException: loopElement') else: element = loopElement.find_element(By.XPATH, - p["relativeXPath"][1:]) + relativeXPath[1:]) self.recordLog( 'StaleElementReferenceException: loopElement+relativeXPath') else: element = self.browser.find_element( - By.XPATH, p["relativeXPath"], iframe=p["iframe"]) + By.XPATH, relativeXPath, iframe=p["iframe"]) self.recordLog( 'StaleElementReferenceException: relativeXPath') content = self.get_content(p, element) except StaleElementReferenceException: self.recordLog( - 'StaleElementReferenceException: '+p["relativeXPath"]) + 'StaleElementReferenceException: ' + relativeXPath) continue # 再出现类似问题直接跳过 self.outputParameters[p["name"]] = content self.execute_code( 2, p["afterJS"], p["afterJSWaitTime"], element, iframe=p["iframe"]) # 执行后置JS - line = new_line(self.outputParameters, self.maxViewLength, self.outputParametersRecord) - self.OUTPUT.append(line) - # rt.end() - + if param["recordASField"] > 0 and param["newLine"]: + line = new_line(self.outputParameters, + self.maxViewLength, self.outputParametersRecord) + self.OUTPUT.append(line) 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], + "ids": [0], "saved_file_name": "", "user_data": False, "config_folder": "", @@ -1338,83 +2206,65 @@ def getData(self, param, loopElement, isInLoop=True, parentPath="", index=0): "read_type": "remote", "headless": False, "server_address": "http://localhost:8074", - "version": "0.3.5", + "keyboard": True, # 是否监听键盘输入 + "pause_key": "p", # 暂停键 + "version": "0.6.0", } c = Config(config) print(c) - options = Options() + options = webdriver.ChromeOptions() driver_path = "chromedriver.exe" - import platform print(sys.platform, platform.architecture()) - option = webdriver.ChromeOptions() - if not os.path.exists(os.getcwd()+"/Data"): - os.mkdir(os.getcwd()+"/Data") + if not os.path.exists(os.getcwd() + "/Data"): + os.mkdir(os.getcwd() + "/Data") if sys.platform == "darwin" and platform.architecture()[0] == "64bit": options.binary_location = "EasySpider.app/Contents/Resources/app/chrome_mac64.app/Contents/MacOS/Google Chrome" - # MacOS需要用option而不是options! - option.binary_location = "EasySpider.app/Contents/Resources/app/chrome_mac64.app/Contents/MacOS/Google Chrome" - option.add_extension("EasySpider.app/Contents/Resources/app/XPathHelper.crx") - options.add_extension("EasySpider.app/Contents/Resources/app/XPathHelper.crx") + options.add_extension( + "EasySpider.app/Contents/Resources/app/XPathHelper.crx") driver_path = "EasySpider.app/Contents/Resources/app/chromedriver_mac64" - # options.binary_location = "chrome_mac64.app/Contents/MacOS/Google Chrome" - # # MacOS需要用option而不是options! - # option.binary_location = "chrome_mac64.app/Contents/MacOS/Google Chrome" - # driver_path = os.getcwd()+ "/chromedriver_mac64" print(driver_path) - elif os.path.exists(os.getcwd()+"/EasySpider/resources"): # 打包后的路径 + if c.config_folder == "": + c.config_folder = os.path.expanduser( + "~/Library/Application Support/EasySpider/") + elif os.path.exists(os.getcwd() + "/EasySpider/resources"): # 打包后的路径 print("Finding chromedriver in EasySpider", - os.getcwd()+"/EasySpider") + os.getcwd() + "/EasySpider") if sys.platform == "win32" and platform.architecture()[0] == "32bit": options.binary_location = os.path.join( os.getcwd(), "EasySpider/resources/app/chrome_win32/chrome.exe") # 指定chrome位置 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() print("Chrome location:", options.binary_location) print("Chromedriver location:", driver_path) - # elif os.getcwd().find("ExecuteStage") >= 0: # 如果直接执行 - # print("Finding chromedriver in ./Chrome", - # os.getcwd()+"/Chrome") - # options.binary_location = "./Chrome/chrome.exe" # 指定chrome位置 - # # option.binary_location = "C:\\Users\\q9823\\AppData\\Local\\Google\\Chrome\\Application\\chrome.exe" - # driver_path = "./Chrome/chromedriver.exe" - elif os.path.exists(os.getcwd()+"/../ElectronJS"): + elif os.path.exists(os.getcwd() + "/../ElectronJS"): # 软件dev用 print("Finding chromedriver in EasySpider", - os.getcwd()+"/ElectronJS") - option.binary_location = "../ElectronJS/chrome_win64/chrome.exe" # 指定chrome位置 + os.getcwd() + "/ElectronJS") + options.binary_location = "../ElectronJS/chrome_win64/chrome.exe" # 指定chrome位置 driver_path = "../ElectronJS/chrome_win64/chromedriver_win64.exe" - option.add_extension("../ElectronJS/XPathHelper.crx") + options.add_extension("../ElectronJS/XPathHelper.crx") else: options.binary_location = "./chrome.exe" # 指定chrome位置 driver_path = "./chromedriver.exe" - option.add_extension("XPathHelper.crx") + options.add_extension("XPathHelper.crx") - option.add_experimental_option( + options.add_experimental_option( 'excludeSwitches', ['enable-automation']) # 以开发者模式 - options.add_argument('-ignore-certificate-errors') - options.add_argument('-ignore -ssl-errors') - option.add_argument('-ignore-certificate-errors') - option.add_argument('-ignore -ssl-errors') - # user_data_dir = r'' # 注意没有Default! - # options.add_argument('--user-data-dir='+p) # 总结: # 0. 带Cookie需要用userdatadir @@ -1425,126 +2275,198 @@ def getData(self, param, loopElement, isInLoop=True, parentPath="", index=0): try: with open(c.config_folder + c.config_file_name, "r", encoding='utf-8') as f: config = json.load(f) + print("Config file path: " + + c.config_folder + c.config_file_name) absolute_user_data_folder = config["absolute_user_data_folder"] - print("\nAbsolute_user_data_folder:", - absolute_user_data_folder, "\n") except: pass - if c.user_data: - option.add_argument( - f'--user-data-dir={absolute_user_data_folder}') # TMALL 反扒 - option.add_argument("--profile-directory=Default") - options.add_argument( - f'--user-data-dir={absolute_user_data_folder}') # TMALL 反扒 - options.add_argument("--profile-directory=Default") + + options.add_argument( + "--disable-blink-features=AutomationControlled") # TMALL 反扒 + + options.add_argument('-ignore-certificate-errors') + options.add_argument('-ignore -ssl-errors') if c.headless: print("Headless mode") print("无头模式") - option.add_argument("--headless") options.add_argument("--headless") - # options.add_argument( - # '--user-data-dir=C:\\Users\\q9823\\AppData\\Local\\Google\\Chrome\\User Data') # TMALL 反扒 - option.add_argument( - "--disable-blink-features=AutomationControlled") # TMALL 反扒 - options.add_argument( - "--disable-blink-features=AutomationControlled") # TMALL 反扒 + tmp_options = [] + for id in c.ids: + tmp_options.append({"options": copy.deepcopy(options), "tmp_user_data_folder": ""}) + + if c.user_data: + tmp_user_folder_parent = os.path.join(os.getcwd(), "TempUserDataFolder") + if not os.path.exists(tmp_user_folder_parent): + os.mkdir(tmp_user_folder_parent) + characters = string.ascii_letters + string.digits + for i in range(len(c.ids)): + id = c.ids[i] + # 从字符集中随机选择字符构成字符串 + random_string = ''.join(random.choice(characters) for i in range(10)) + tmp_user_data_folder = os.path.join(tmp_user_folder_parent, "user_data_" + str(id) + "_" + str(time.time()).replace(".","") + "_" + random_string) + tmp_options[i]["tmp_user_data_folder"] = tmp_user_data_folder + if os.path.exists(tmp_user_data_folder): + try: + shutil.rmtree(tmp_user_data_folder) + except: + pass + print(f"Copying user data folder to: {tmp_user_data_folder}, please wait...") + print(f"正在复制用户信息目录到: {tmp_user_data_folder},请稍等...") + if os.path.exists(absolute_user_data_folder): + try: + shutil.copytree(absolute_user_data_folder, tmp_user_data_folder) + print("User data folder copied successfully, if you exit the program before it finishes, please delete the temporary user data folder manually.") + print("用户信息目录复制成功,如果程序在运行过程中被手动退出,请手动删除临时用户信息目录。") + except: + tmp_user_data_folder = absolute_user_data_folder + print("Copy user data folder failed, use the original folder.") + print("复制用户信息目录失败,使用原始目录。") + else: + tmp_user_data_folder = absolute_user_data_folder + print("Cannot find user data folder, create a new folder.") + print("未找到用户信息目录,创建新目录。") + options = tmp_options[i]["options"] + options.add_argument( + f'--user-data-dir={tmp_user_data_folder}') # TMALL 反扒 + options.add_argument("--profile-directory=Default") + print( + "如果报错Selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally,说明有之前运行的Chrome实例没有正常关闭,请关闭之前打开的所有Chrome实例后再运行程序即可。") + print( + "If you get an error Selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally, it means that there is a Chrome instance that was not closed properly before, please close all Chrome instances that were opened before running the program.") threads = [] - for i in c.id: - # print(options) - print("id: ", i) + for i in range(len(c.ids)): + id = c.ids[i] + options = tmp_options[i]["options"] + print("id: ", id) if c.read_type == "remote": print("remote") content = requests.get( - c.server_address + "/queryExecutionInstance?id=" + str(i)) + c.server_address + "/queryExecutionInstance?id=" + str(id)) service = json.loads(content.text) # 加载服务信息 else: print("local") - with open("execution_instances/" + str(i) + ".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) # 加载服务信息 - print("Task Name:", service["name"]) - print("任务名称:", service["name"]) + try: + print("Task Name:", service["name"]) + print("任务名称:", service["name"]) + except: + print(f"Cannot find task with id: {str(id)}, please check whether {str(id)}.json exists in the 'execution_instances' folder.") + print(f"未找到id为{str(id)}的任务,请检查'execution_instances'文件夹中是否存在{str(id)}.json文件。") + continue try: cloudflare = service["cloudflare"] except: cloudflare = 0 if cloudflare == 0: + options.add_argument('log-level=3') # 隐藏日志 + path = os.path.join(os.path.abspath("./"), "Data", "Task_" + str(id)) + print("Data path:", path) options.add_experimental_option("prefs", { # 设置文件下载路径 - "download.default_directory": "Data/Task_" + str(i), + "download.default_directory": path, "download.prompt_for_download": False, # 禁止下载提示框 "plugins.plugins_list": [{"enabled": False, "name": "Chrome PDF Viewer"}], "download.directory_upgrade": True, "download.extensions_to_open": "applications/pdf", - "plugins.always_open_pdf_externally": True # 总是在外部程序中打开PDF - }) - option.add_experimental_option("prefs", { - # 设置文件下载路径 - "download.default_directory": "Data/Task_" + str(i), - "download.prompt_for_download": False, # 禁止下载提示框 - "plugins.plugins_list": [{"enabled": False, "name": "Chrome PDF Viewer"}], - "download.directory_upgrade": True, - "download.extensions_to_open": "applications/pdf", - "plugins.always_open_pdf_externally": True # 总是在外部程序中打开PDF + "plugins.always_open_pdf_externally": True, # 总是在外部程序中打开PDF + "safebrowsing_for_trusted_sources_enabled": False, + "safebrowsing.enabled": False, + 'safebrowsing.disable_download_protection': True, + 'profile.default_content_settings.popups': 0, }) try: if service["environment"] == 1: - option.add_experimental_option( - 'mobileEmulation', {'deviceName': 'iPhone X'}) # 模拟iPhone X浏览 options.add_experimental_option( 'mobileEmulation', {'deviceName': 'iPhone X'}) # 模拟iPhone X浏览 except: pass - browser_t = MyChrome( - options=options, chrome_options=option, executable_path=driver_path) + try: + browser = service["browser"] + except: + browser = "chrome" + if browser == "chrome": + selenium_service = Service(executable_path=driver_path) + browser_t = MyChrome(service=selenium_service, options=options) + elif browser == "edge": + from selenium.webdriver.edge.service import Service as EdgeService + from selenium.webdriver.edge.options import Options as EdgeOptions + from myChrome import MyEdge + selenium_service = EdgeService(executable_path="msedgedriver.exe") + options = EdgeOptions() + options.use_chromium = True + options.add_argument("--ie-mode") + options.add_argument("ie.edgepath=msedge.exe") + browser_t = MyEdge(service=selenium_service, options=options) elif cloudflare == 1: - browser_t = MyUCChrome( - options=options, chrome_options=option, driver_executable_path=driver_path) - print("Pass Cloudflare Mode") - print("过Cloudflare验证模式") + if sys.platform == "win32": + options.binary_location = "C:\\Program Files\\Google\\Chrome Beta\\Application\\chrome.exe" # 需要用自己的浏览器 + browser_t = MyUCChrome( + options=options, driver_executable_path=driver_path) + links = list(filter(isnotnull, service["links"].split("\n"))) + # open page in new tab + browser_t.execute_script( + 'window.open("' + links[0] + '","_blank");') + time.sleep(5) # wait until page has loaded + browser_t.switch_to.window( + browser_t.window_handles[1]) # switch to new tab + # browser_t = uc.Chrome() + else: + print("Cloudflare模式只支持Windows x64平台。") + print( + "Cloudflare Mode only support on Windows x64 platform.") + sys.exit() event = Event() event.set() - thread = BrowserThread(browser_t, i, service, - c.version, event, c.saved_file_name, config=config) - print("Thread with task id: ", i, " is created") + thread = BrowserThread(browser_t, id, service, + c.version, event, c.saved_file_name, config=config, option=tmp_options[i]) + print("Thread with task id: ", id, " is created") threads.append(thread) thread.start() # Set the pause operation - # if sys.platform != "linux": + # if sys.platform != "linux": # 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("----------------------------------\n\n") # Thread(target=check_pause, args=("p", event)).start() # else: time.sleep(3) - press_time = {"duration": 0, "is_pressed": False} + if c.pause_key == "p": + try: + pause_key = service["pauseKey"] + except: + pause_key = "p" + else: + pause_key = c.pause_key + press_time = {"duration": 0, "is_pressed": False, "pause_key": pause_key} 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( + "正在运行任务,长按键盘" + pause_key + "键可暂停任务的执行以便手工操作浏览器如输入验证码;如果想恢复任务的执行,请再次长按" + pause_key + "键。") + print( + "Running task, long press '" + pause_key + "' 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 '" + pause_key + "' again.") print("----------------------------------\n\n") + # if cloudflare: + # print("过Cloudflare验证模式有时候会不稳定,如果无法通过验证则需要隔几分钟重试一次,或者可以更换新的用户信息文件夹再执行任务。") + # print("Passing the Cloudflare verification mode is sometimes unstable. If the verification fails, you need to try again every few minutes, or you can change to a new user information folder and then execute the task.") # 使用监听器监听键盘输入 - try: - with Listener(on_press=on_press_creator(press_time, event), on_release=on_release_creator(event, press_time)) as listener: + try: + if c.keyboard: + with Listener(on_press=on_press_creator(press_time, event), + on_release=on_release_creator(event, press_time)) as listener: listener.join() - except: - pass - # print("您的操作系统不支持暂停功能。") - # print("Your operating system does not support the pause function.") - - - # print("线程长度:", len(threads) ) - + except: + pass + # print("您的操作系统不支持暂停功能。") + # print("Your operating system does not support the pause function.") + for thread in threads: print() thread.join() - - for thread in threads: - thread.browser.quit() - # print("Thread with task id: ", thread.id, " is closed") - print("程序已运行完成,请手动关闭此窗口。") - print("The program has finished running, please manually close this window.") diff --git a/.temp_to_pub/EasySpider_Linux_x64/myCode.py b/.temp_to_pub/EasySpider_Linux_x64/myCode.py new file mode 100644 index 00000000..36245edf --- /dev/null +++ b/.temp_to_pub/EasySpider_Linux_x64/myCode.py @@ -0,0 +1,58 @@ +""" +这是一个示例代码文件,可以直接在这里写Python代码,然后在程序中的exec操作中调用。如果此文件名称为myCode.py,请将此文件放置在EasySpider程序目录下(和Data/文件夹同级),那么在程序中的exec操作中可以直接写outside:myCode.py来调用此文件中的代码,示例: + +1. 用self.browser表示当前操作的浏览器,可直接用selenium的API进行操作,如self.browser.find_element(By.CSS_SELECTOR, "body").send_keys(Keys.END)即可滚动到页面最下方。 +2. 自定义一个全局变量:self.myVar = 1 +3. 操纵上面定义的全局变量:self.myVar = self.myVar + 1 +4. 打印上面定义的全局变量:print(self.myVar) +5. 将自定义变量的值赋值为某个字段提取的值:self.myVar = self.outputParameters["字段名"] +6. 修改某个字段提取的值:self.outputParameters["字段名"] = "新值" + +对于更加复杂的操作,请直接下载源代码并编译执行。 + +This is a sample code snippet file. You can directly write Python code here, and then call it in the program using an `exec` operation. If this file is named myCode.py, please place this file under the EasySpider program directory (at the same level as the Data/ folder). Then, in the program's `exec` operation, you can directly write outside:myCode.py to invoke the code from this file. Examples: + +1. Use self.browser to refer to the current browser being operated on. You can directly utilize the selenium API to perform actions. For instance, self.browser.find_element(By.CSS_SELECTOR, "body").send_keys(Keys.END) will scroll to the bottom of the page. +2. Define a global variable: self.myVar = 1 +3. Manipulate the above-defined global variable: self.myVar = self.myVar + 1 +4. Print the above-defined global variable: print(self.myVar) +5. Assign a value to the custom variable from a value extracted for some field: self.myVar = self.outputParameters["field name"] +6. Modify the value extracted for some field: self.outputParameters["field name"] = "new value" + +For more complex operations, please download the source code and compile it for execution. +""" + +# 请在下面编写你的代码,不要有代码缩进!!! | Please write your code below, do not indent the code!!! + +# 导包 | Import packages +from selenium.common.exceptions import ElementClickInterceptedException + +# 定义一个函数 | Define a function +def test(n = 0): + for i in range(0, n): + if i % 2 == 0: + print(i) + return "test" + +# 异常捕获 | Exception capture +try: + # 使用XPath定位元素并点击浏览器中元素 | Use XPath to locate the element and click the element in the browser + element = self.browser.find_element(By.XPATH, "//*[contains(@class, 'LeftSide_menu_list__qXCeM')]/div[1]/a[1]") # 这里请忽略IDE语法报错如找不到self的报错,因为代码是嵌入到程序中的,IDE无法识别self变量和By变量是正常的 | Please ignore the warning reported by the IDE such as "'self' is not defined", because the code is embedded in the program, and the IDE cannot recognize that the self variable and By variable are normal + actions = ActionChains(self.browser) + actions.click(element).perform() + print("点击成功|Click success") +except ElementClickInterceptedException: + # 如果元素被遮挡,点击失败 + print("元素被遮挡,无法点击|The element is blocked and cannot be clicked") +except Exception as e: + # 打印其他异常 + print("发生了一个异常|An exception occurred", e) +finally: + # 测试函数 | Test function + self.a = 1 + print("a = ", self.a) + self.a = self.a + 1 + print("a = ", self.a) + print("All parameters:", self.outputParameters) + print(test(3)) + print("执行完毕|Execution completed") diff --git a/.temp_to_pub/EasySpider_Linux_x64/tasks/115.json b/.temp_to_pub/EasySpider_Linux_x64/tasks/115.json index 64b21ddd..fbbfd192 100644 --- a/.temp_to_pub/EasySpider_Linux_x64/tasks/115.json +++ b/.temp_to_pub/EasySpider_Linux_x64/tasks/115.json @@ -1,25 +1,49 @@ { "id": 115, - "name": "网易云音乐", - "url": "https://music.163.com/#/discover/toplist?id=71384707", - "links": "https://music.163.com/#/discover/toplist?id=71384707", - "create_time": "7/4/2023, 7:14:50 AM", + "name": "Dynamic Iframe", + "url": "http://localhost:8074/taskGrid/test_pages/iframe.html?address=http://www.ceic.ac.cn/history", + "links": "http://localhost:8074/taskGrid/test_pages/iframe.html?address=http://www.ceic.ac.cn/history", + "create_time": "7/8/2023, 8:43:14 AM", + "update_time": "7/15/2023, 8:05:33 AM", "version": "0.3.5", "saveThreshold": 10, "cloudflare": 0, "environment": 0, + "maxViewLength": 15, + "outputFormat": "xlsx", + "saveName": "地震Info", "containJudge": false, - "desc": "https://music.163.com/#/discover/toplist?id=71384707", + "desc": "http://localhost:8074/taskGrid/test_pages/iframe.html?address=http://www.ceic.ac.cn/history", "inputParameters": [ { "id": 0, "name": "urlList_0", "nodeId": 1, "nodeName": "打开网页", - "value": "https://music.163.com/#/discover/toplist?id=71384707", + "value": "http://localhost:8074/taskGrid/test_pages/iframe.html?address=http://www.ceic.ac.cn/history", "desc": "要采集的网址列表,多行以\\n分开", - "type": "string", - "exampleValue": "https://music.163.com/#/discover/toplist?id=71384707" + "type": "text", + "exampleValue": "http://localhost:8074/taskGrid/test_pages/iframe.html?address=http://www.ceic.ac.cn/history" + }, + { + "id": 1, + "name": "inputText_1", + "nodeName": "输入文字", + "nodeId": 3, + "desc": "要输入的文本,如京东搜索框输入:电脑", + "type": "text", + "exampleValue": "1", + "value": "1" + }, + { + "id": 2, + "name": "loopTimes_循环_2", + "nodeId": 5, + "nodeName": "循环", + "desc": "循环循环执行的次数(0代表无限循环)", + "type": "int", + "exampleValue": 0, + "value": 0 } ], "outputParameters": [ @@ -27,232 +51,105 @@ "id": 0, "name": "参数1_文本", "desc": "", - "type": "string", - "exampleValue": "Nocturne No. 2 in E Flat Major, Op. 9, No. 2" + "type": "double", + "recordASField": 1, + "exampleValue": "5.0" }, { "id": 1, "name": "参数2_文本", "desc": "", - "type": "string", - "exampleValue": "作曲 : Frédéric François Chopin纯音乐,请欣赏" + "type": "datetime", + "recordASField": 1, + "exampleValue": "2023-06-2912:58:00" }, { "id": 2, - "name": "参数3_链接文本", + "name": "参数3_文本", "desc": "", - "type": "string", - "exampleValue": "" + "type": "text", + "recordASField": 1, + "exampleValue": "37.10" }, { "id": 3, - "name": "参数4_链接地址", + "name": "参数4_文本", "desc": "", - "type": "string", - "exampleValue": "/user/home?id=6622403" + "type": "text", + "recordASField": 1, + "exampleValue": "71.85" }, { "id": 4, - "name": "参数5_图片地址", + "name": "参数5_文本", "desc": "", - "type": "string", - "exampleValue": "http://p2.music.126.net/XM9AGb0vN4OSKK4WeZM7aA==/109951165633941106.jpg?param=50y50" + "type": "int", + "recordASField": 1, + "exampleValue": "140" }, { "id": 5, - "name": "参数6_文本", + "name": "参数1_页面标题", "desc": "", - "type": "string", - "exampleValue": ":建议这种纯音乐,小编在歌词中做简介" + "type": "text", + "recordASField": 1, + "exampleValue": "塔吉克斯坦" }, { "id": 6, - "name": "参数7_链接文本", + "name": "参数7_链接地址", "desc": "", - "type": "string", - "exampleValue": "新鑫曼巴" + "type": "text", + "recordASField": 1, + "exampleValue": "https://news.ceic.ac.cn/CC20230629125800.html" }, { "id": 7, - "name": "参数8_链接地址", + "name": "参数8_文本", "desc": "", - "type": "string", - "exampleValue": "/user/home?id=6622403" + "type": "text", + "recordASField": 1, + "exampleValue": "震级(M)" }, { "id": 8, - "name": "参数9_图片地址", + "name": "参数9_文本", "desc": "", - "type": "string", - "exampleValue": "http://p5.music.126.net/obj/wovDmcKXw6PCn2_CmsOk/17941162599/305d/0dee/968a/22f0de72becf0485ecac1d6a5898825a.png" + "type": "text", + "recordASField": 1, + "exampleValue": "发震时刻(UTC+8)" }, { "id": 9, "name": "参数10_文本", "desc": "", - "type": "string", - "exampleValue": "2016年4月18日" + "type": "text", + "recordASField": 1, + "exampleValue": "纬度(°)" }, { "id": 10, - "name": "参数11_链接文本", + "name": "参数11_文本", "desc": "", - "type": "string", - "exampleValue": "删除" + "type": "text", + "recordASField": 1, + "exampleValue": "经度(°)" }, { "id": 11, - "name": "参数12_链接地址", + "name": "参数12_文本", "desc": "", - "type": "string", - "exampleValue": "javascript:void(0)" + "type": "text", + "recordASField": 1, + "exampleValue": "深度(千米)" }, { "id": 12, "name": "参数13_文本", "desc": "", - "type": "string", - "exampleValue": "|" - }, - { - "id": 13, - "name": "参数14_链接文本", - "desc": "", - "type": "string", - "exampleValue": " (29844)" - }, - { - "id": 14, - "name": "参数15_链接地址", - "desc": "", - "type": "string", - "exampleValue": "javascript:void(0)" - }, - { - "id": 15, - "name": "参数16_文本", - "desc": "", - "type": "string", - "exampleValue": "|" - }, - { - "id": 16, - "name": "参数17_链接文本", - "desc": "", - "type": "string", - "exampleValue": "回复" - }, - { - "id": 17, - "name": "参数18_链接地址", - "desc": "", - "type": "string", - "exampleValue": "javascript:void(0)" - }, - { - "id": 18, - "name": "参数19_文本", - "desc": "", - "type": "string", - "exampleValue": ":有次我在琴房练琴,练的是一首通俗歌曲改编的钢琴曲。正当我沉醉于自己的琴声时,隔壁忽然传来这首夜曲,那一刻我突然觉得自己练的曲子简直是没法听,于是后半段就没练,坐在琴房听隔壁弹了一个小时夜曲。" - }, - { - "id": 19, - "name": "参数20_文本", - "desc": "", - "type": "string", - "exampleValue": "◆" - }, - { - "id": 20, - "name": "参数21_文本", - "desc": "", - "type": "string", - "exampleValue": "◆" - }, - { - "id": 21, - "name": "参数22_文本", - "desc": "", - "type": "string", - "exampleValue": "2016年4月24日" - }, - { - "id": 22, - "name": "参数23_链接文本", - "desc": "", - "type": "string", - "exampleValue": "删除" - }, - { - "id": 23, - "name": "参数24_链接地址", - "desc": "", - "type": "string", - "exampleValue": "javascript:void(0)" - }, - { - "id": 24, - "name": "参数25_文本", - "desc": "", - "type": "string", - "exampleValue": "|" - }, - { - "id": 25, - "name": "参数26_链接文本", - "desc": "", - "type": "string", - "exampleValue": " (7809)" - }, - { - "id": 26, - "name": "参数27_链接地址", - "desc": "", - "type": "string", - "exampleValue": "javascript:void(0)" - }, - { - "id": 27, - "name": "参数28_文本", - "desc": "", - "type": "string", - "exampleValue": "|" - }, - { - "id": 28, - "name": "参数29_链接文本", - "desc": "", - "type": "string", - "exampleValue": "回复" - }, - { - "id": 29, - "name": "参数30_链接地址", - "desc": "", - "type": "string", - "exampleValue": "javascript:void(0)" - }, - { - "id": 30, - "name": "参数31_图片地址", - "desc": "", - "type": "string", - "exampleValue": "http://s1.music.126.net/style/web2/emt/emoji_13.png" - }, - { - "id": 31, - "name": "参数32_图片地址", - "desc": "", - "type": "string", - "exampleValue": "https://p5.music.126.net/obj/wonDlsKUwrLClGjCm8Kx/21892874340/50e6/e81d/5292/2d693cbb98954e28d4d9fdb11be99a8b.png" - }, - { - "id": 32, - "name": "参数33_链接文本", - "desc": "", - "type": "string", - "exampleValue": "网易云音乐" + "type": "text", + "recordASField": 1, + "exampleValue": "参考位置" } ], "graph": [ @@ -263,13 +160,14 @@ "type": -1, "option": 0, "title": "root", - "sequence": [1, 10, 11, 12], + "sequence": [1, 3, 4, 5], "parameters": { "history": 1, "tabIndex": 0, "useLoop": false, "xpath": "", - "wait": 0 + "wait": 0, + "waitType": 0 }, "isInLoop": false }, @@ -292,12 +190,13 @@ "beforeJSWaitTime": 0, "afterJS": "", "afterJSWaitTime": 0, - "url": "https://music.163.com/#/discover/toplist?id=71384707", - "links": "https://music.163.com/#/discover/toplist?id=71384707", - "maxWaitTime": 100, + "url": "http://localhost:8074/taskGrid/test_pages/iframe.html?address=http://www.ceic.ac.cn/history", + "links": "http://localhost:8074/taskGrid/test_pages/iframe.html?address=http://www.ceic.ac.cn/history", + "maxWaitTime": 10, "scrollType": 0, "scrollCount": 1, - "scrollWaitTime": 1 + "scrollWaitTime": 1, + "cookies": "" } }, { @@ -305,52 +204,132 @@ "index": 2, "parentId": 0, "type": 0, - "option": 2, - "title": "点击元素", + "option": 3, + "title": "提取数据", "sequence": [], "isInLoop": false, "position": 1, "parameters": { - "history": 4, + "history": 5, "tabIndex": -1, "useLoop": false, - "xpath": "//*[contains(@class, \"user\")]", - "iframe": true, - "wait": 2, + "xpath": "", + "iframe": false, + "wait": 0, "waitType": 0, "beforeJS": "", "beforeJSWaitTime": 0, "afterJS": "", "afterJSWaitTime": 0, - "scrollType": 0, - "scrollCount": 1, - "scrollWaitTime": 1, - "clickWay": 0, - "maxWaitTime": 10, - "params": [], - "allXPaths": [ - "/html/body/div[3]/div[2]/div[1]/div[1]/div[1]/div[2]/div[1]/div[2]", - "//div[contains(., '最近更新:06月2')]", - "//DIV[@class='user f-cb']", - "/html/body/div[last()-10]/div/div/div[last()-1]/div/div/div/div[last()-1]" + "paras": [ + { + "nodeType": 0, + "contentType": 6, + "relative": false, + "name": "参数1_页面标题", + "desc": "", + "extractType": 0, + "relativeXPath": "/html/body/iframe[1]", + "allXPaths": [ + "/html/body/iframe[1]", + "//iframe[contains(., '')]", + "id(\"myIframe\")", + "/html/body/iframe[last()-1]" + ], + "exampleValues": [{ "num": 0, "value": "Dynamic Iframe" }], + "unique_index": "14hqdlhesn6ljt6eja8", + "iframe": false, + "default": "", + "paraType": "text", + "recordASField": 1, + "beforeJS": "", + "beforeJSWaitTime": 0, + "JS": "", + "JSWaitTime": 0, + "afterJS": "", + "afterJSWaitTime": 0, + "downloadPic": 0 + }, + { + "nodeType": 1, + "contentType": 0, + "relative": false, + "name": "参数1_链接文本", + "desc": "", + "extractType": 0, + "relativeXPath": "/html/body/div[1]/div[3]/div[1]/div[1]/div[1]/form[1]/div[5]/a[1]", + "allXPaths": [ + "/html/body/div[1]/div[3]/div[1]/div[1]/div[1]/form[1]/div[5]/a[1]", + "//a[contains(., '查询')]", + "id(\"search\")", + "//A[@class='check']", + "/html/body/div[last()-3]/div[last()-1]/div/div/div[last()-1]/form/div/a" + ], + "exampleValues": [{ "num": 0, "value": "查询" }], + "unique_index": "gxhcdetmmgcljt6evon", + "iframe": true, + "default": "", + "paraType": "text", + "recordASField": 0, + "beforeJS": "", + "beforeJSWaitTime": 0, + "JS": "", + "JSWaitTime": 0, + "afterJS": "", + "afterJSWaitTime": 0, + "downloadPic": 0 + }, + { + "nodeType": 0, + "contentType": 5, + "relative": false, + "name": "参数1_页面网址", + "desc": "", + "extractType": 0, + "relativeXPath": "/html/body/iframe[1]", + "allXPaths": [ + "/html/body/iframe[1]", + "//iframe[contains(., '')]", + "id(\"myIframe\")", + "/html/body/iframe[last()-1]" + ], + "exampleValues": [ + { + "num": 0, + "value": "http://localhost:8074/taskGrid/test_pages/iframe.html?address=http://www.ceic.ac.cn/history" + } + ], + "unique_index": "e663xi39mb4ljt6em4l", + "iframe": false, + "default": "", + "paraType": "text", + "recordASField": 1, + "beforeJS": "", + "beforeJSWaitTime": 0, + "JS": "", + "JSWaitTime": 0, + "afterJS": "", + "afterJSWaitTime": 0, + "downloadPic": 0 + } ] } }, { - "id": -1, + "id": 2, "index": 3, "parentId": 0, - "type": 1, - "option": 8, - "title": "循环", - "sequence": [5, 4], + "type": 0, + "option": 4, + "title": "输入文字", + "sequence": [], "isInLoop": false, - "position": 2, + "position": 1, "parameters": { - "history": 4, + "history": 5, "tabIndex": -1, "useLoop": false, - "xpath": "//*[contains(@class, \"user\")]", + "xpath": "//*[@id=\"weidu1\"]", "iframe": true, "wait": 0, "waitType": 0, @@ -358,42 +337,32 @@ "beforeJSWaitTime": 0, "afterJS": "", "afterJSWaitTime": 0, - "scrollType": 0, - "scrollCount": 1, - "scrollWaitTime": 1, - "loopType": 0, - "pathList": "", - "textList": "", - "code": "", - "waitTime": 0, - "exitCount": 0, - "historyWait": 2, - "breakMode": 0, - "breakCode": "", - "breakCodeWaitTime": 0, + "value": "1", "allXPaths": [ - "/html/body/div[3]/div[2]/div[1]/div[1]/div[1]/div[2]/div[1]/div[2]", - "//div[contains(., '最近更新:06月2')]", - "//DIV[@class='user f-cb']", - "/html/body/div[last()-10]/div/div/div[last()-1]/div/div/div/div[last()-1]" + "/html/body/div[1]/div[3]/div[1]/div[1]/div[1]/form[1]/div[2]/input[1]", + "//input[contains(., '')]", + "id(\"weidu1\")", + "//INPUT[@class='span1']", + "//INPUT[@name='weidu1']", + "/html/body/div[last()-3]/div[last()-1]/div/div/div[last()-1]/form/div[last()-3]/input[last()-1]" ] } }, { - "id": -1, + "id": 3, "index": 4, - "parentId": 3, + "parentId": 0, "type": 0, "option": 2, "title": "点击元素", "sequence": [], - "isInLoop": true, - "position": 1, + "isInLoop": false, + "position": 2, "parameters": { - "history": 4, + "history": 5, "tabIndex": -1, - "useLoop": true, - "xpath": "//*[contains(@class, \"user\")]", + "useLoop": false, + "xpath": "//*[@id=\"search\"]", "iframe": true, "wait": 2, "waitType": 0, @@ -406,31 +375,31 @@ "scrollWaitTime": 1, "clickWay": 0, "maxWaitTime": 10, - "params": [], + "paras": [], "allXPaths": [ - "/html/body/div[3]/div[2]/div[1]/div[1]/div[1]/div[2]/div[1]/div[2]", - "//div[contains(., '最近更新:06月2')]", - "//DIV[@class='user f-cb']", - "/html/body/div[last()-10]/div/div/div[last()-1]/div/div/div/div[last()-1]" - ], - "loopType": 0 + "/html/body/div[1]/div[3]/div[1]/div[1]/div[1]/form[1]/div[5]/a[1]", + "//a[contains(., '查询')]", + "id(\"search\")", + "//A[@class='check']", + "/html/body/div[last()-3]/div[last()-1]/div/div/div[last()-1]/form/div/a" + ] } }, { - "id": -1, + "id": 4, "index": 5, - "parentId": 3, + "parentId": 0, "type": 1, "option": 8, "title": "循环", - "sequence": [6, 7, 8], - "isInLoop": true, - "position": 0, + "sequence": [7, 6], + "isInLoop": false, + "position": 3, "parameters": { - "history": 4, + "history": 5, "tabIndex": -1, "useLoop": false, - "xpath": "/html/body/div[3]/div[2]/div[1]/div[2]/div[2]/div[1]/div[1]/table[1]/tbody[1]/tr[1]/td", + "xpath": "//*[contains(@class, \"pagination\")]/ul[1]/li[last()-1]/a[1]", "iframe": true, "wait": 0, "waitType": 0, @@ -441,7 +410,7 @@ "scrollType": 0, "scrollCount": 1, "scrollWaitTime": 1, - "loopType": 1, + "loopType": 0, "pathList": "", "textList": "", "code": "", @@ -451,11 +420,15 @@ "breakMode": 0, "breakCode": "", "breakCodeWaitTime": 0, - "allXPaths": "" + "allXPaths": [ + "/html/body/div[1]/div[3]/div[1]/div[1]/div[2]/div[1]/div[2]/div[1]/div[1]/ul[1]/li[10]/a[1]", + "//a[contains(., '»')]", + "/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div/div/div/ul/li[last()-1]/a" + ] } }, { - "id": -1, + "id": 6, "index": 6, "parentId": 4, "type": 0, @@ -463,12 +436,12 @@ "title": "点击元素", "sequence": [], "isInLoop": true, - "position": 0, + "position": 1, "parameters": { - "history": 4, + "history": 5, "tabIndex": -1, "useLoop": true, - "xpath": "/html/body/div[3]/div[2]/div[1]/div[2]/div[2]/div[1]/div[1]/table[1]/tbody[1]/tr[1]/td", + "xpath": "//*[contains(@class, \"pagination\")]/ul[1]/li[10]/a[1]", "iframe": true, "wait": 2, "waitType": 0, @@ -481,58 +454,30 @@ "scrollWaitTime": 1, "clickWay": 0, "maxWaitTime": 10, - "params": [], - "allXPaths": "", - "loopType": 1 - } - }, - { - "id": -1, - "index": 7, - "parentId": 4, - "type": 0, - "option": 4, - "title": "输入文字", - "sequence": [], - "isInLoop": true, - "position": 1, - "parameters": { - "history": 4, - "tabIndex": -1, - "useLoop": false, - "xpath": "//*[@id=\"auto-id-8mWuLxTMrXQaQCra\"]", - "iframe": true, - "wait": 0, - "waitType": 0, - "beforeJS": "", - "beforeJSWaitTime": 0, - "afterJS": "", - "afterJSWaitTime": 0, - "value": "123", + "paras": [], "allXPaths": [ - "/html/body/div[3]/div[2]/div[1]/div[2]/div[3]/div[1]/div[2]/div[1]/div[2]/div[1]/div[1]/div[1]/textarea[1]", - "//textarea[contains(., '')]", - "id(\"auto-id-8mWuLxTMrXQaQCra\")", - "//TEXTAREA[@class='u-txt area j-flag']", - "/html/body/div[last()-10]/div/div/div/div/div/div/div[last()-2]/div/div/div/div[last()-2]/textarea" - ] + "/html/body/div[1]/div[3]/div[1]/div[1]/div[2]/div[1]/div[2]/div[1]/div[1]/ul[1]/li[10]/a[1]", + "//a[contains(., '»')]", + "/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div/div/div/ul/li[last()-1]/a" + ], + "loopType": 0 } }, { - "id": -1, - "index": 8, + "id": 5, + "index": 7, "parentId": 4, "type": 1, "option": 8, "title": "循环", - "sequence": [9], + "sequence": [8], "isInLoop": true, - "position": 2, + "position": 0, "parameters": { - "history": 4, + "history": 5, "tabIndex": -1, "useLoop": false, - "xpath": "/html/body/div[3]/div[2]/div[1]/div[2]/div[2]/div[1]/div[1]/table[1]/tbody[1]/tr", + "xpath": "/html/body/div[1]/div[3]/div[1]/div[1]/div[2]/div[1]/div[1]/table[1]/tbody[1]/tr", "iframe": true, "wait": 0, "waitType": 0, @@ -554,18 +499,17 @@ "breakCode": "", "breakCodeWaitTime": 0, "allXPaths": [ - "/html/body/div[3]/div[2]/div[1]/div[2]/div[2]/div[1]/div[1]/table[1]/tbody[1]/tr[1]", - "//tr[contains(., '11 NocturE')]", - "id(\"10609141688418212092\")", - "//TR[@class='even js-dis']", - "/html/body/div[last()-10]/div/div/div/div[last()-1]/div/div[last()-1]/table/tbody/tr[last()-99]" + "/html/body/div[1]/div[3]/div[1]/div[1]/div[2]/div[1]/div[1]/table[1]/tbody[1]/tr[1]", + "//tr[contains(., '震级(M)发震时刻(')]", + "//TR[@class='speed-tr-h1']", + "/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-20]" ] } }, { - "id": -1, - "index": 9, - "parentId": 8, + "id": 7, + "index": 8, + "parentId": 5, "type": 0, "option": 3, "title": "提取数据", @@ -573,7 +517,7 @@ "isInLoop": true, "position": 0, "parameters": { - "history": 4, + "history": 5, "tabIndex": -1, "useLoop": false, "xpath": "", @@ -584,24 +528,25 @@ "beforeJSWaitTime": 0, "afterJS": "", "afterJSWaitTime": 0, - "params": [ + "paras": [ { "nodeType": 0, "contentType": 1, "relative": true, - "name": "参数73_文本", + "name": "参数1_文本", "desc": "", - "relativeXPath": "/td[1]/div[1]/span[1]", + "relativeXPath": "/td[1]", "allXPaths": [ - "/td[1]/div[1]/span[1]", - "//span[contains(., '1')]", - "//SPAN[@class='num']", - "/html/body/div[last()-10]/div/div/div/div[last()-1]/div/div[last()-1]/table/tbody/tr[last()-99]/td[last()-3]/div/span" + "/td[1]", + "//td[contains(., '5.0')]", + "/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-19]/td[last()-5]" ], - "exampleValues": [{ "num": 0, "value": "1" }], - "unique_index": "/td[1]/div[1]/span[1]", + "exampleValues": [{ "num": 0, "value": "5.0" }], + "unique_index": "/td[1]", "iframe": true, - "default": "", + "default": "8.8", + "paraType": "double", + "recordASField": 1, "beforeJS": "", "beforeJSWaitTime": 0, "JS": "", @@ -614,19 +559,20 @@ "nodeType": 0, "contentType": 1, "relative": true, - "name": "参数74_文本", + "name": "参数2_文本", "desc": "", - "relativeXPath": "/td[1]/div[1]/div[1]/span[1]", + "relativeXPath": "/td[2]", "allXPaths": [ - "/td[1]/div[1]/div[1]/span[1]", - "//span[contains(., '1')]", - "//SPAN[@class='ico u-icn u-icn-73 s-fc9']", - "/html/body/div[last()-10]/div/div/div/div[last()-1]/div/div[last()-1]/table/tbody/tr[last()-99]/td[last()-3]/div/div/span" + "/td[2]", + "//td[contains(., '2023-06-29')]", + "/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-19]/td[last()-4]" ], - "exampleValues": [{ "num": 0, "value": "1" }], - "unique_index": "/td[1]/div[1]/div[1]/span[1]", + "exampleValues": [{ "num": 0, "value": "2023-06-2912:58:00" }], + "unique_index": "/td[2]", "iframe": true, - "default": "", + "default": "2020-02-08 00:01:02", + "paraType": "datetime", + "recordASField": 1, "beforeJS": "", "beforeJSWaitTime": 0, "JS": "", @@ -636,21 +582,23 @@ "downloadPic": 0 }, { - "nodeType": 1, - "contentType": 0, + "nodeType": 0, + "contentType": 1, "relative": true, - "name": "参数75_链接文本", + "name": "参数3_文本", "desc": "", - "relativeXPath": "/td[2]/div[1]/div[1]/a[1]", + "relativeXPath": "/td[3]", "allXPaths": [ - "/td[2]/div[1]/div[1]/a[1]", - "//a[contains(., '')]", - "/html/body/div[last()-10]/div/div/div/div[last()-1]/div/div[last()-1]/table/tbody/tr[last()-99]/td[last()-2]/div/div/a" + "/td[3]", + "//td[contains(., '37.10')]", + "/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-19]/td[last()-3]" ], - "exampleValues": [{ "num": 0, "value": "" }], - "unique_index": "/td[2]/div[1]/div[1]/a[1]", + "exampleValues": [{ "num": 0, "value": "37.10" }], + "unique_index": "/td[3]", "iframe": true, "default": "", + "paraType": "text", + "recordASField": 1, "beforeJS": "", "beforeJSWaitTime": 0, "JS": "", @@ -660,21 +608,23 @@ "downloadPic": 0 }, { - "nodeType": 2, - "contentType": 0, + "nodeType": 0, + "contentType": 1, "relative": true, - "name": "参数76_链接地址", + "name": "参数4_文本", "desc": "", - "relativeXPath": "/td[2]/div[1]/div[1]/a[1]", + "relativeXPath": "/td[4]", "allXPaths": [ - "/td[2]/div[1]/div[1]/a[1]", - "//a[contains(., '')]", - "/html/body/div[last()-10]/div/div/div/div[last()-1]/div/div[last()-1]/table/tbody/tr[last()-99]/td[last()-2]/div/div/a" + "/td[4]", + "//td[contains(., '71.85')]", + "/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-19]/td[last()-2]" ], - "exampleValues": [{ "num": 0, "value": "/song?id=1060914" }], - "unique_index": "/td[2]/div[1]/div[1]/a[1]", + "exampleValues": [{ "num": 0, "value": "71.85" }], + "unique_index": "/td[4]", "iframe": true, "default": "", + "paraType": "text", + "recordASField": 1, "beforeJS": "", "beforeJSWaitTime": 0, "JS": "", @@ -684,27 +634,23 @@ "downloadPic": 0 }, { - "nodeType": 4, + "nodeType": 0, "contentType": 1, "relative": true, - "name": "参数77_图片地址", + "name": "参数5_文本", "desc": "", - "relativeXPath": "/td[2]/div[1]/div[1]/a[1]/img[1]", + "relativeXPath": "/td[5]", "allXPaths": [ - "/td[2]/div[1]/div[1]/a[1]/img[1]", - "//img[contains(., '')]", - "//IMG[@class='rpic']", - "/html/body/div[last()-10]/div/div/div/div[last()-1]/div/div[last()-1]/table/tbody/tr[last()-99]/td[last()-2]/div/div/a/img" - ], - "exampleValues": [ - { - "num": 0, - "value": "http://p1.music.126.net/Dvhon4mH7qimTtE7q3omTw==/1419469524716144.jpg?param=50y50&quality=100" - } + "/td[5]", + "//td[contains(., '140')]", + "/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-19]/td[last()-1]" ], - "unique_index": "/td[2]/div[1]/div[1]/a[1]/img[1]", + "exampleValues": [{ "num": 0, "value": "140" }], + "unique_index": "/td[5]", "iframe": true, "default": "", + "paraType": "int", + "recordASField": 1, "beforeJS": "", "beforeJSWaitTime": 0, "JS": "", @@ -717,23 +663,21 @@ "nodeType": 1, "contentType": 0, "relative": true, - "name": "参数78_链接文本", + "name": "参数1_页面标题", "desc": "", - "relativeXPath": "/td[2]/div[1]/div[1]/div[1]/span[1]/a[1]", + "relativeXPath": "/td[6]/a[1]", "allXPaths": [ - "/td[2]/div[1]/div[1]/div[1]/span[1]/a[1]", - "//a[contains(., 'NocturEJpn')]", - "/html/body/div[last()-10]/div/div/div/div[last()-1]/div/div[last()-1]/table/tbody/tr[last()-99]/td[last()-2]/div/div/div/span/a" - ], - "exampleValues": [ - { - "num": 0, - "value": "NocturEJpne No. 2 in E Flat Major, Op. 9, No. 2" - } + "/td[6]/a[1]", + "//a[contains(., '塔吉克斯坦')]", + "id(\"cid\")", + "/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-19]/td/a" ], - "unique_index": "/td[2]/div[1]/div[1]/div[1]/span[1]/a[1]", + "exampleValues": [{ "num": 0, "value": "塔吉克斯坦" }], + "unique_index": "/td[6]/a[1]", "iframe": true, "default": "", + "paraType": "text", + "recordASField": 1, "beforeJS": "", "beforeJSWaitTime": 0, "JS": "", @@ -746,18 +690,26 @@ "nodeType": 2, "contentType": 0, "relative": true, - "name": "参数79_链接地址", + "name": "参数7_链接地址", "desc": "", - "relativeXPath": "/td[2]/div[1]/div[1]/div[1]/span[1]/a[1]", + "relativeXPath": "/td[6]/a[1]", "allXPaths": [ - "/td[2]/div[1]/div[1]/div[1]/span[1]/a[1]", - "//a[contains(., 'NocturEJpn')]", - "/html/body/div[last()-10]/div/div/div/div[last()-1]/div/div[last()-1]/table/tbody/tr[last()-99]/td[last()-2]/div/div/div/span/a" + "/td[6]/a[1]", + "//a[contains(., '塔吉克斯坦')]", + "id(\"cid\")", + "/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-19]/td/a" + ], + "exampleValues": [ + { + "num": 0, + "value": "https://news.ceic.ac.cn/CC20230629125800.html" + } ], - "exampleValues": [{ "num": 0, "value": "/song?id=1060914" }], - "unique_index": "/td[2]/div[1]/div[1]/div[1]/span[1]/a[1]", + "unique_index": "/td[6]/a[1]", "iframe": true, "default": "", + "paraType": "text", + "recordASField": 1, "beforeJS": "", "beforeJSWaitTime": 0, "JS": "", @@ -770,270 +722,20 @@ "nodeType": 0, "contentType": 1, "relative": true, - "name": "参数80_文本", + "name": "参数8_文本", "desc": "", - "relativeXPath": "/td[2]/div[1]/div[1]/div[1]/span[1]/a[1]/b[1]", + "relativeXPath": "/th[1]", "allXPaths": [ - "/td[2]/div[1]/div[1]/div[1]/span[1]/a[1]/b[1]", - "//b[contains(., 'NocturEJpn')]", - "/html/body/div[last()-10]/div/div/div/div[last()-1]/div/div[last()-1]/table/tbody/tr[last()-99]/td[last()-2]/div/div/div/span/a/b" + "/th[1]", + "//th[contains(., '震级(M)')]", + "/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-20]/th[last()-5]" ], - "exampleValues": [ - { "num": 0, "value": "NocturneNo.2inEFlatMajor,Op.9,No.2" } - ], - "unique_index": "/td[2]/div[1]/div[1]/div[1]/span[1]/a[1]/b[1]", - "iframe": true, - "default": "", - "beforeJS": "", - "beforeJSWaitTime": 0, - "JS": "", - "JSWaitTime": 0, - "afterJS": "", - "afterJSWaitTime": 0, - "downloadPic": 0 - }, - { - "nodeType": 0, - "contentType": 1, - "relative": true, - "name": "参数81_文本", - "desc": "", - "relativeXPath": "/td[2]/div[1]/div[1]/div[1]/span[1]/a[1]/b[1]/div[1]", - "allXPaths": [ - "/td[2]/div[1]/div[1]/div[1]/span[1]/a[1]/b[1]/div[1]", - "//div[contains(., 'EJp')]", - "//DIV[@class='soil']", - "/html/body/div[last()-10]/div/div/div/div[last()-1]/div/div[last()-1]/table/tbody/tr[last()-99]/td[last()-2]/div/div/div/span/a/b/div" - ], - "exampleValues": [{ "num": 0, "value": "EJp" }], - "unique_index": "/td[2]/div[1]/div[1]/div[1]/span[1]/a[1]/b[1]/div[1]", - "iframe": true, - "default": "", - "beforeJS": "", - "beforeJSWaitTime": 0, - "JS": "", - "JSWaitTime": 0, - "afterJS": "", - "afterJSWaitTime": 0, - "downloadPic": 0 - }, - { - "nodeType": 0, - "contentType": 1, - "relative": true, - "name": "参数82_文本", - "desc": "", - "relativeXPath": "/td[2]/div[1]/div[1]/div[1]/span[1]/span[1]", - "allXPaths": [ - "/td[2]/div[1]/div[1]/div[1]/span[1]/span[1]", - "//span[contains(., '- (降E大调第2')]", - "//SPAN[@class='s-fc8']", - "/html/body/div[last()-10]/div/div/div/div[last()-1]/div/div[last()-1]/table/tbody/tr[last()-99]/td[last()-2]/div/div/div/span/span" - ], - "exampleValues": [ - { "num": 0, "value": "-(降E大调第2号夜曲,作品9)" } - ], - "unique_index": "/td[2]/div[1]/div[1]/div[1]/span[1]/span[1]", - "iframe": true, - "default": "", - "beforeJS": "", - "beforeJSWaitTime": 0, - "JS": "", - "JSWaitTime": 0, - "afterJS": "", - "afterJSWaitTime": 0, - "downloadPic": 0 - }, - { - "nodeType": 0, - "contentType": 1, - "relative": true, - "name": "参数83_文本", - "desc": "", - "relativeXPath": "/td[2]/div[1]/div[1]/div[1]/span[1]/span[1]/div[1]", - "allXPaths": [ - "/td[2]/div[1]/div[1]/div[1]/span[1]/span[1]/div[1]", - "//div[contains(., '函潖奪')]", - "//DIV[@class='soil']", - "/html/body/div[last()-10]/div/div/div/div[last()-1]/div/div[last()-1]/table/tbody/tr[last()-99]/td[last()-2]/div/div/div/span/span/div" - ], - "exampleValues": [{ "num": 0, "value": "函潖奪" }], - "unique_index": "/td[2]/div[1]/div[1]/div[1]/span[1]/span[1]/div[1]", - "iframe": true, - "default": "", - "beforeJS": "", - "beforeJSWaitTime": 0, - "JS": "", - "JSWaitTime": 0, - "afterJS": "", - "afterJSWaitTime": 0, - "downloadPic": 0 - }, - { - "nodeType": 0, - "contentType": 1, - "relative": true, - "name": "参数84_文本", - "desc": "", - "relativeXPath": "/td[3]/span[1]", - "allXPaths": [ - "/td[3]/span[1]", - "//span[contains(., '04:26')]", - "//SPAN[@class='u-dur ']", - "/html/body/div[last()-10]/div/div/div/div[last()-1]/div/div[last()-1]/table/tbody/tr[last()-99]/td[last()-1]/span" - ], - "exampleValues": [{ "num": 0, "value": "04:26" }], - "unique_index": "/td[3]/span[1]", - "iframe": true, - "default": "", - "beforeJS": "", - "beforeJSWaitTime": 0, - "JS": "", - "JSWaitTime": 0, - "afterJS": "", - "afterJSWaitTime": 0, - "downloadPic": 0 - }, - { - "nodeType": 1, - "contentType": 0, - "relative": true, - "name": "参数85_链接文本", - "desc": "", - "relativeXPath": "/td[3]/div[1]/a[1]", - "allXPaths": [ - "/td[3]/div[1]/a[1]", - "//a[contains(., '')]", - "//A[@class='u-icn u-icn-81 icn-add']", - "/html/body/div[last()-10]/div/div/div/div[last()-1]/div/div[last()-1]/table/tbody/tr[last()-99]/td[last()-1]/div/a" - ], - "exampleValues": [{ "num": 0, "value": "" }], - "unique_index": "/td[3]/div[1]/a[1]", - "iframe": true, - "default": "", - "beforeJS": "", - "beforeJSWaitTime": 0, - "JS": "", - "JSWaitTime": 0, - "afterJS": "", - "afterJSWaitTime": 0, - "downloadPic": 0 - }, - { - "nodeType": 2, - "contentType": 0, - "relative": true, - "name": "参数86_链接地址", - "desc": "", - "relativeXPath": "/td[3]/div[1]/a[1]", - "allXPaths": [ - "/td[3]/div[1]/a[1]", - "//a[contains(., '')]", - "//A[@class='u-icn u-icn-81 icn-add']", - "/html/body/div[last()-10]/div/div/div/div[last()-1]/div/div[last()-1]/table/tbody/tr[last()-99]/td[last()-1]/div/a" - ], - "exampleValues": [{ "num": 0, "value": "javascript:;" }], - "unique_index": "/td[3]/div[1]/a[1]", - "iframe": true, - "default": "", - "beforeJS": "", - "beforeJSWaitTime": 0, - "JS": "", - "JSWaitTime": 0, - "afterJS": "", - "afterJSWaitTime": 0, - "downloadPic": 0 - }, - { - "nodeType": 0, - "contentType": 1, - "relative": true, - "name": "参数87_文本", - "desc": "", - "relativeXPath": "/td[3]/div[1]/span[2]", - "allXPaths": [ - "/td[3]/div[1]/span[2]", - "//span[contains(., '分享')]", - "//SPAN[@class='icn icn-share']", - "/html/body/div[last()-10]/div/div/div/div[last()-1]/div/div[last()-1]/table/tbody/tr[last()-99]/td[last()-1]/div/span[last()-1]" - ], - "exampleValues": [{ "num": 0, "value": "分享" }], - "unique_index": "/td[3]/div[1]/span[2]", - "iframe": true, - "default": "", - "beforeJS": "", - "beforeJSWaitTime": 0, - "JS": "", - "JSWaitTime": 0, - "afterJS": "", - "afterJSWaitTime": 0, - "downloadPic": 0 - }, - { - "nodeType": 1, - "contentType": 0, - "relative": true, - "name": "参数88_链接文本", - "desc": "", - "relativeXPath": "/td[4]/div[1]/span[1]/a[1]", - "allXPaths": [ - "/td[4]/div[1]/span[1]/a[1]", - "//a[contains(., 'Arthur Rub')]", - "/html/body/div[last()-10]/div/div/div/div[last()-1]/div/div[last()-1]/table/tbody/tr[last()-99]/td/div/span/a" - ], - "exampleValues": [{ "num": 0, "value": "Arthur Rubiwf8knstein" }], - "unique_index": "/td[4]/div[1]/span[1]/a[1]", - "iframe": true, - "default": "", - "beforeJS": "", - "beforeJSWaitTime": 0, - "JS": "", - "JSWaitTime": 0, - "afterJS": "", - "afterJSWaitTime": 0, - "downloadPic": 0 - }, - { - "nodeType": 2, - "contentType": 0, - "relative": true, - "name": "参数89_链接地址", - "desc": "", - "relativeXPath": "/td[4]/div[1]/span[1]/a[1]", - "allXPaths": [ - "/td[4]/div[1]/span[1]/a[1]", - "//a[contains(., 'Arthur Rub')]", - "/html/body/div[last()-10]/div/div/div/div[last()-1]/div/div[last()-1]/table/tbody/tr[last()-99]/td/div/span/a" - ], - "exampleValues": [{ "num": 0, "value": "/artist?id=12541250" }], - "unique_index": "/td[4]/div[1]/span[1]/a[1]", - "iframe": true, - "default": "", - "beforeJS": "", - "beforeJSWaitTime": 0, - "JS": "", - "JSWaitTime": 0, - "afterJS": "", - "afterJSWaitTime": 0, - "downloadPic": 0 - }, - { - "nodeType": 0, - "contentType": 1, - "relative": true, - "name": "参数90_文本", - "desc": "", - "relativeXPath": "/td[4]/div[1]/span[1]/a[1]/div[1]", - "allXPaths": [ - "/td[4]/div[1]/span[1]/a[1]/div[1]", - "//div[contains(., 'wf8k')]", - "//DIV[@class='soil']", - "/html/body/div[last()-10]/div/div/div/div[last()-1]/div/div[last()-1]/table/tbody/tr[last()-99]/td/div/span/a/div" - ], - "exampleValues": [{ "num": 0, "value": "wf8k" }], - "unique_index": "/td[4]/div[1]/span[1]/a[1]/div[1]", + "exampleValues": [{ "num": 1, "value": "震级(M)" }], + "unique_index": "/th[1]", "iframe": true, "default": "", + "paraType": "text", + "recordASField": 1, "beforeJS": "", "beforeJSWaitTime": 0, "JS": "", @@ -1046,18 +748,20 @@ "nodeType": 0, "contentType": 1, "relative": true, - "name": "参数91_文本", + "name": "参数9_文本", "desc": "", - "relativeXPath": "/td[4]/div[1]/span[1]/span[1]", + "relativeXPath": "/th[2]", "allXPaths": [ - "/td[4]/div[1]/span[1]/span[1]", - "//span[contains(., 'Noble Musi')]", - "/html/body/div[last()-10]/div/div/div/div[last()-1]/div/div[last()-1]/table/tbody/tr[last()-97]/td/div/span/span" + "/th[2]", + "//th[contains(., '发震时刻(UTC+8')]", + "/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-20]/th[last()-4]" ], - "exampleValues": [{ "num": 2, "value": "NobleMusicProject" }], - "unique_index": "/td[4]/div[1]/span[1]/span[1]", + "exampleValues": [{ "num": 1, "value": "发震时刻(UTC+8)" }], + "unique_index": "/th[2]", "iframe": true, "default": "", + "paraType": "text", + "recordASField": 1, "beforeJS": "", "beforeJSWaitTime": 0, "JS": "", @@ -1070,19 +774,20 @@ "nodeType": 0, "contentType": 1, "relative": true, - "name": "参数92_文本", + "name": "参数10_文本", "desc": "", - "relativeXPath": "/td[4]/div[1]/span[1]/span[1]/div[1]", + "relativeXPath": "/th[3]", "allXPaths": [ - "/td[4]/div[1]/span[1]/span[1]/div[1]", - "//div[contains(., 'fXuJ')]", - "//DIV[@class='soil']", - "/html/body/div[last()-10]/div/div/div/div[last()-1]/div/div[last()-1]/table/tbody/tr[last()-97]/td/div/span/span/div" + "/th[3]", + "//th[contains(., '纬度(°)')]", + "/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-20]/th[last()-3]" ], - "exampleValues": [{ "num": 2, "value": "fXuJ" }], - "unique_index": "/td[4]/div[1]/span[1]/span[1]/div[1]", + "exampleValues": [{ "num": 1, "value": "纬度(°)" }], + "unique_index": "/th[3]", "iframe": true, "default": "", + "paraType": "text", + "recordASField": 1, "beforeJS": "", "beforeJSWaitTime": 0, "JS": "", @@ -1095,66 +800,20 @@ "nodeType": 0, "contentType": 1, "relative": true, - "name": "参数93_文本", - "desc": "", - "relativeXPath": "/td[4]/div[1]/span[1]", - "allXPaths": [ - "/td[4]/div[1]/span[1]", - "//span[contains(., 'JohaNOfnn')]", - "/html/body/div[last()-10]/div/div/div/div[last()-1]/div/div[last()-1]/table/tbody/tr[last()-87]/td/div/span" - ], - "exampleValues": [{ "num": 12, "value": "/" }], - "unique_index": "/td[4]/div[1]/span[1]", - "iframe": true, - "default": "", - "beforeJS": "", - "beforeJSWaitTime": 0, - "JS": "", - "JSWaitTime": 0, - "afterJS": "", - "afterJSWaitTime": 0, - "downloadPic": 0 - }, - { - "nodeType": 1, - "contentType": 0, - "relative": true, - "name": "参数94_链接文本", + "name": "参数11_文本", "desc": "", - "relativeXPath": "/td[4]/div[1]/span[1]/a[2]", + "relativeXPath": "/th[4]", "allXPaths": [ - "/td[4]/div[1]/span[1]/a[2]", - "//a[contains(., 'Chris USne')]", - "/html/body/div[last()-10]/div/div/div/div[last()-1]/div/div[last()-1]/table/tbody/tr[last()-87]/td/div/span/a" + "/th[4]", + "//th[contains(., '经度(°)')]", + "/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-20]/th[last()-2]" ], - "exampleValues": [{ "num": 12, "value": "Chris USnelling" }], - "unique_index": "/td[4]/div[1]/span[1]/a[2]", - "iframe": true, - "default": "", - "beforeJS": "", - "beforeJSWaitTime": 0, - "JS": "", - "JSWaitTime": 0, - "afterJS": "", - "afterJSWaitTime": 0, - "downloadPic": 0 - }, - { - "nodeType": 2, - "contentType": 0, - "relative": true, - "name": "参数95_链接地址", - "desc": "", - "relativeXPath": "/td[4]/div[1]/span[1]/a[2]", - "allXPaths": [ - "/td[4]/div[1]/span[1]/a[2]", - "//a[contains(., 'Chris USne')]", - "/html/body/div[last()-10]/div/div/div/div[last()-1]/div/div[last()-1]/table/tbody/tr[last()-87]/td/div/span/a" - ], - "exampleValues": [{ "num": 12, "value": "/artist?id=13065095" }], - "unique_index": "/td[4]/div[1]/span[1]/a[2]", + "exampleValues": [{ "num": 1, "value": "经度(°)" }], + "unique_index": "/th[4]", "iframe": true, "default": "", + "paraType": "text", + "recordASField": 1, "beforeJS": "", "beforeJSWaitTime": 0, "JS": "", @@ -1167,67 +826,20 @@ "nodeType": 0, "contentType": 1, "relative": true, - "name": "参数96_文本", - "desc": "", - "relativeXPath": "/td[4]/div[1]/span[1]/a[2]/div[1]", - "allXPaths": [ - "/td[4]/div[1]/span[1]/a[2]/div[1]", - "//div[contains(., 'U')]", - "//DIV[@class='soil']", - "/html/body/div[last()-10]/div/div/div/div[last()-1]/div/div[last()-1]/table/tbody/tr[last()-87]/td/div/span/a/div" - ], - "exampleValues": [{ "num": 12, "value": "U" }], - "unique_index": "/td[4]/div[1]/span[1]/a[2]/div[1]", - "iframe": true, - "default": "", - "beforeJS": "", - "beforeJSWaitTime": 0, - "JS": "", - "JSWaitTime": 0, - "afterJS": "", - "afterJSWaitTime": 0, - "downloadPic": 0 - }, - { - "nodeType": 1, - "contentType": 0, - "relative": true, - "name": "参数97_链接文本", - "desc": "", - "relativeXPath": "/td[4]/div[1]/span[1]/a[3]", - "allXPaths": [ - "/td[4]/div[1]/span[1]/a[3]", - "//a[contains(., 'Eberhard a')]", - "/html/body/div[last()-10]/div/div/div/div[last()-1]/div/div[last()-1]/table/tbody/tr[last()-81]/td/div/span/a[last()-1]" - ], - "exampleValues": [{ "num": 18, "value": "Eberhard aFJFinke" }], - "unique_index": "/td[4]/div[1]/span[1]/a[3]", - "iframe": true, - "default": "", - "beforeJS": "", - "beforeJSWaitTime": 0, - "JS": "", - "JSWaitTime": 0, - "afterJS": "", - "afterJSWaitTime": 0, - "downloadPic": 0 - }, - { - "nodeType": 2, - "contentType": 0, - "relative": true, - "name": "参数98_链接地址", + "name": "参数12_文本", "desc": "", - "relativeXPath": "/td[4]/div[1]/span[1]/a[3]", + "relativeXPath": "/th[5]", "allXPaths": [ - "/td[4]/div[1]/span[1]/a[3]", - "//a[contains(., 'Eberhard a')]", - "/html/body/div[last()-10]/div/div/div/div[last()-1]/div/div[last()-1]/table/tbody/tr[last()-81]/td/div/span/a[last()-1]" + "/th[5]", + "//th[contains(., '深度(千米)')]", + "/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-20]/th[last()-1]" ], - "exampleValues": [{ "num": 18, "value": "/artist?id=265005" }], - "unique_index": "/td[4]/div[1]/span[1]/a[3]", + "exampleValues": [{ "num": 1, "value": "深度(千米)" }], + "unique_index": "/th[5]", "iframe": true, "default": "", + "paraType": "text", + "recordASField": 1, "beforeJS": "", "beforeJSWaitTime": 0, "JS": "", @@ -1240,1301 +852,20 @@ "nodeType": 0, "contentType": 1, "relative": true, - "name": "参数99_文本", + "name": "参数13_文本", "desc": "", - "relativeXPath": "/td[4]/div[1]/span[1]/a[3]/div[1]", + "relativeXPath": "/th[6]", "allXPaths": [ - "/td[4]/div[1]/span[1]/a[3]/div[1]", - "//div[contains(., 'aFJ')]", - "//DIV[@class='soil']", - "/html/body/div[last()-10]/div/div/div/div[last()-1]/div/div[last()-1]/table/tbody/tr[last()-81]/td/div/span/a[last()-1]/div" + "/th[6]", + "//th[contains(., '参考位置')]", + "/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-20]/th" ], - "exampleValues": [{ "num": 18, "value": "aFJ" }], - "unique_index": "/td[4]/div[1]/span[1]/a[3]/div[1]", - "iframe": true, - "default": "", - "beforeJS": "", - "beforeJSWaitTime": 0, - "JS": "", - "JSWaitTime": 0, - "afterJS": "", - "afterJSWaitTime": 0, - "downloadPic": 0 - }, - { - "nodeType": 1, - "contentType": 0, - "relative": true, - "name": "参数100_链接文本", - "desc": "", - "relativeXPath": "/td[4]/div[1]/span[1]/a[4]", - "allXPaths": [ - "/td[4]/div[1]/span[1]/a[4]", - "//a[contains(., 'Mstip4Usla')]", - "/html/body/div[last()-10]/div/div/div/div[last()-1]/div/div[last()-1]/table/tbody/tr[last()-81]/td/div/span/a" - ], - "exampleValues": [ - { "num": 18, "value": "Mstip4Uslav Rostropovich" } - ], - "unique_index": "/td[4]/div[1]/span[1]/a[4]", - "iframe": true, - "default": "", - "beforeJS": "", - "beforeJSWaitTime": 0, - "JS": "", - "JSWaitTime": 0, - "afterJS": "", - "afterJSWaitTime": 0, - "downloadPic": 0 - }, - { - "nodeType": 2, - "contentType": 0, - "relative": true, - "name": "参数101_链接地址", - "desc": "", - "relativeXPath": "/td[4]/div[1]/span[1]/a[4]", - "allXPaths": [ - "/td[4]/div[1]/span[1]/a[4]", - "//a[contains(., 'Mstip4Usla')]", - "/html/body/div[last()-10]/div/div/div/div[last()-1]/div/div[last()-1]/table/tbody/tr[last()-81]/td/div/span/a" - ], - "exampleValues": [{ "num": 18, "value": "/artist?id=155815" }], - "unique_index": "/td[4]/div[1]/span[1]/a[4]", - "iframe": true, - "default": "", - "beforeJS": "", - "beforeJSWaitTime": 0, - "JS": "", - "JSWaitTime": 0, - "afterJS": "", - "afterJSWaitTime": 0, - "downloadPic": 0 - }, - { - "nodeType": 0, - "contentType": 1, - "relative": true, - "name": "参数102_文本", - "desc": "", - "relativeXPath": "/td[4]/div[1]/span[1]/a[4]/div[1]", - "allXPaths": [ - "/td[4]/div[1]/span[1]/a[4]/div[1]", - "//div[contains(., 'p4U')]", - "//DIV[@class='soil']", - "/html/body/div[last()-10]/div/div/div/div[last()-1]/div/div[last()-1]/table/tbody/tr[last()-81]/td/div/span/a/div" - ], - "exampleValues": [{ "num": 18, "value": "p4U" }], - "unique_index": "/td[4]/div[1]/span[1]/a[4]/div[1]", - "iframe": true, - "default": "", - "beforeJS": "", - "beforeJSWaitTime": 0, - "JS": "", - "JSWaitTime": 0, - "afterJS": "", - "afterJSWaitTime": 0, - "downloadPic": 0 - }, - { - "nodeType": 0, - "contentType": 1, - "relative": true, - "name": "参数103_文本", - "desc": "", - "relativeXPath": "/td[2]/div[1]/div[1]/div[1]/span[1]/span[2]", - "allXPaths": [ - "/td[2]/div[1]/div[1]/div[1]/span[1]/span[2]", - "//span[contains(., 'MV')]", - "//SPAN[@class='mv']", - "/html/body/div[last()-10]/div/div/div/div[last()-1]/div/div[last()-1]/table/tbody/tr[last()-62]/td[last()-2]/div/div/div/span/span" - ], - "exampleValues": [{ "num": 37, "value": "MV" }], - "unique_index": "/td[2]/div[1]/div[1]/div[1]/span[1]/span[2]", - "iframe": true, - "default": "", - "beforeJS": "", - "beforeJSWaitTime": 0, - "JS": "", - "JSWaitTime": 0, - "afterJS": "", - "afterJSWaitTime": 0, - "downloadPic": 0 - }, - { - "nodeType": 1, - "contentType": 0, - "relative": true, - "name": "参数104_链接文本", - "desc": "", - "relativeXPath": "/td[4]/div[1]/span[1]/a[5]", - "allXPaths": [ - "/td[4]/div[1]/span[1]/a[5]", - "//a[contains(., 'AdIUBrpad')]", - "/html/body/div[last()-10]/div/div/div/div[last()-1]/div/div[last()-1]/table/tbody/tr[last()-18]/td/div/span/a[last()-2]" - ], - "exampleValues": [{ "num": 81, "value": "AdIUBrpad Gérecz" }], - "unique_index": "/td[4]/div[1]/span[1]/a[5]", - "iframe": true, - "default": "", - "beforeJS": "", - "beforeJSWaitTime": 0, - "JS": "", - "JSWaitTime": 0, - "afterJS": "", - "afterJSWaitTime": 0, - "downloadPic": 0 - }, - { - "nodeType": 2, - "contentType": 0, - "relative": true, - "name": "参数105_链接地址", - "desc": "", - "relativeXPath": "/td[4]/div[1]/span[1]/a[5]", - "allXPaths": [ - "/td[4]/div[1]/span[1]/a[5]", - "//a[contains(., 'AdIUBrpad')]", - "/html/body/div[last()-10]/div/div/div/div[last()-1]/div/div[last()-1]/table/tbody/tr[last()-18]/td/div/span/a[last()-2]" - ], - "exampleValues": [{ "num": 81, "value": "/artist?id=213459" }], - "unique_index": "/td[4]/div[1]/span[1]/a[5]", - "iframe": true, - "default": "", - "beforeJS": "", - "beforeJSWaitTime": 0, - "JS": "", - "JSWaitTime": 0, - "afterJS": "", - "afterJSWaitTime": 0, - "downloadPic": 0 - }, - { - "nodeType": 0, - "contentType": 1, - "relative": true, - "name": "参数106_文本", - "desc": "", - "relativeXPath": "/td[4]/div[1]/span[1]/a[5]/div[1]", - "allXPaths": [ - "/td[4]/div[1]/span[1]/a[5]/div[1]", - "//div[contains(., 'dIUB')]", - "//DIV[@class='soil']", - "/html/body/div[last()-10]/div/div/div/div[last()-1]/div/div[last()-1]/table/tbody/tr[last()-18]/td/div/span/a[last()-2]/div" - ], - "exampleValues": [{ "num": 81, "value": "dIUB" }], - "unique_index": "/td[4]/div[1]/span[1]/a[5]/div[1]", - "iframe": true, - "default": "", - "beforeJS": "", - "beforeJSWaitTime": 0, - "JS": "", - "JSWaitTime": 0, - "afterJS": "", - "afterJSWaitTime": 0, - "downloadPic": 0 - }, - { - "nodeType": 1, - "contentType": 0, - "relative": true, - "name": "参数107_链接文本", - "desc": "", - "relativeXPath": "/td[4]/div[1]/span[1]/a[6]", - "allXPaths": [ - "/td[4]/div[1]/span[1]/a[6]", - "//a[contains(., 'New Philha')]", - "/html/body/div[last()-10]/div/div/div/div[last()-1]/div/div[last()-1]/table/tbody/tr[last()-18]/td/div/span/a[last()-1]" - ], - "exampleValues": [ - { "num": 81, "value": "New Philharmoniali Orchestra" } - ], - "unique_index": "/td[4]/div[1]/span[1]/a[6]", - "iframe": true, - "default": "", - "beforeJS": "", - "beforeJSWaitTime": 0, - "JS": "", - "JSWaitTime": 0, - "afterJS": "", - "afterJSWaitTime": 0, - "downloadPic": 0 - }, - { - "nodeType": 2, - "contentType": 0, - "relative": true, - "name": "参数108_链接地址", - "desc": "", - "relativeXPath": "/td[4]/div[1]/span[1]/a[6]", - "allXPaths": [ - "/td[4]/div[1]/span[1]/a[6]", - "//a[contains(., 'New Philha')]", - "/html/body/div[last()-10]/div/div/div/div[last()-1]/div/div[last()-1]/table/tbody/tr[last()-18]/td/div/span/a[last()-1]" - ], - "exampleValues": [{ "num": 81, "value": "/artist?id=129486" }], - "unique_index": "/td[4]/div[1]/span[1]/a[6]", - "iframe": true, - "default": "", - "beforeJS": "", - "beforeJSWaitTime": 0, - "JS": "", - "JSWaitTime": 0, - "afterJS": "", - "afterJSWaitTime": 0, - "downloadPic": 0 - }, - { - "nodeType": 0, - "contentType": 1, - "relative": true, - "name": "参数109_文本", - "desc": "", - "relativeXPath": "/td[4]/div[1]/span[1]/a[6]/div[1]", - "allXPaths": [ - "/td[4]/div[1]/span[1]/a[6]/div[1]", - "//div[contains(., 'li')]", - "//DIV[@class='soil']", - "/html/body/div[last()-10]/div/div/div/div[last()-1]/div/div[last()-1]/table/tbody/tr[last()-18]/td/div/span/a[last()-1]/div" - ], - "exampleValues": [{ "num": 81, "value": "li" }], - "unique_index": "/td[4]/div[1]/span[1]/a[6]/div[1]", - "iframe": true, - "default": "", - "beforeJS": "", - "beforeJSWaitTime": 0, - "JS": "", - "JSWaitTime": 0, - "afterJS": "", - "afterJSWaitTime": 0, - "downloadPic": 0 - }, - { - "nodeType": 1, - "contentType": 0, - "relative": true, - "name": "参数110_链接文本", - "desc": "", - "relativeXPath": "/td[4]/div[1]/span[1]/a[7]", - "allXPaths": [ - "/td[4]/div[1]/span[1]/a[7]", - "//a[contains(., 'Edo de Waf')]", - "/html/body/div[last()-10]/div/div/div/div[last()-1]/div/div[last()-1]/table/tbody/tr[last()-18]/td/div/span/a" - ], - "exampleValues": [{ "num": 81, "value": "Edo de WafczUart" }], - "unique_index": "/td[4]/div[1]/span[1]/a[7]", - "iframe": true, - "default": "", - "beforeJS": "", - "beforeJSWaitTime": 0, - "JS": "", - "JSWaitTime": 0, - "afterJS": "", - "afterJSWaitTime": 0, - "downloadPic": 0 - }, - { - "nodeType": 2, - "contentType": 0, - "relative": true, - "name": "参数111_链接地址", - "desc": "", - "relativeXPath": "/td[4]/div[1]/span[1]/a[7]", - "allXPaths": [ - "/td[4]/div[1]/span[1]/a[7]", - "//a[contains(., 'Edo de Waf')]", - "/html/body/div[last()-10]/div/div/div/div[last()-1]/div/div[last()-1]/table/tbody/tr[last()-18]/td/div/span/a" - ], - "exampleValues": [{ "num": 81, "value": "/artist?id=144817" }], - "unique_index": "/td[4]/div[1]/span[1]/a[7]", - "iframe": true, - "default": "", - "beforeJS": "", - "beforeJSWaitTime": 0, - "JS": "", - "JSWaitTime": 0, - "afterJS": "", - "afterJSWaitTime": 0, - "downloadPic": 0 - }, - { - "nodeType": 0, - "contentType": 1, - "relative": true, - "name": "参数112_文本", - "desc": "", - "relativeXPath": "/td[4]/div[1]/span[1]/a[7]/div[1]", - "allXPaths": [ - "/td[4]/div[1]/span[1]/a[7]/div[1]", - "//div[contains(., 'fczU')]", - "//DIV[@class='soil']", - "/html/body/div[last()-10]/div/div/div/div[last()-1]/div/div[last()-1]/table/tbody/tr[last()-18]/td/div/span/a/div" - ], - "exampleValues": [{ "num": 81, "value": "fczU" }], - "unique_index": "/td[4]/div[1]/span[1]/a[7]/div[1]", - "iframe": true, - "default": "", - "beforeJS": "", - "beforeJSWaitTime": 0, - "JS": "", - "JSWaitTime": 0, - "afterJS": "", - "afterJSWaitTime": 0, - "downloadPic": 0 - } - ] - } - }, - { - "id": 2, - "index": 10, - "parentId": 0, - "type": 0, - "option": 2, - "title": "点击元素", - "sequence": [], - "isInLoop": false, - "position": 1, - "parameters": { - "history": 3, - "tabIndex": -1, - "useLoop": false, - "xpath": "//*[@id=\"10609141688426033070\"]/td[2]/div[1]/div[1]/div[1]/span[1]/a[1]/b[1]", - "iframe": true, - "wait": 2, - "waitType": 0, - "beforeJS": "", - "beforeJSWaitTime": 0, - "afterJS": "", - "afterJSWaitTime": 0, - "scrollType": 0, - "scrollCount": 1, - "scrollWaitTime": 1, - "clickWay": 0, - "maxWaitTime": 10, - "params": [], - "allXPaths": [ - "/html/body/div[3]/div[2]/div[1]/div[2]/div[2]/div[1]/div[1]/table[1]/tbody[1]/tr[1]/td[2]/div[1]/div[1]/div[1]/span[1]/a[1]/b[1]", - "//b[contains(., 'Nocturne N')]", - "/html/body/div[last()-10]/div/div/div/div[last()-1]/div/div[last()-1]/table/tbody/tr[last()-99]/td[last()-2]/div/div/div/span/a/b" - ] - } - }, - { - "id": 3, - "index": 11, - "parentId": 0, - "type": 0, - "option": 3, - "title": "提取数据", - "sequence": [], - "isInLoop": false, - "position": 2, - "parameters": { - "history": 4, - "tabIndex": -1, - "useLoop": false, - "xpath": "", - "iframe": true, - "wait": 0, - "waitType": 0, - "beforeJS": "", - "beforeJSWaitTime": 0, - "afterJS": "", - "afterJSWaitTime": 0, - "params": [ - { - "nodeType": 0, - "contentType": 0, - "relative": false, - "name": "参数1_文本", - "desc": "", - "relativeXPath": "/html/body/div[3]/div[1]/div[1]/div[1]/div[1]/div[1]/div[2]/div[1]/div[1]/em[1]", - "allXPaths": [ - "/html/body/div[3]/div[1]/div[1]/div[1]/div[1]/div[1]/div[2]/div[1]/div[1]/em[1]", - "//em[contains(., 'Nocturne N')]", - "//EM[@class='f-ff2']", - "/html/body/div[last()-8]/div[last()-1]/div/div/div[last()-1]/div[last()-1]/div/div[last()-2]/div/em" - ], - "exampleValues": [ - { - "num": 0, - "value": "Nocturne No. 2 in E Flat Major, Op. 9, No. 2" - } - ], - "unique_index": "8l265os1r85ljnha0rx", - "iframe": true, - "default": "", - "beforeJS": "", - "beforeJSWaitTime": 0, - "JS": "", - "JSWaitTime": 0, - "afterJS": "", - "afterJSWaitTime": 0, - "downloadPic": 0 - }, - { - "nodeType": 0, - "contentType": 0, - "relative": false, - "name": "参数2_文本", - "desc": "", - "relativeXPath": "/html/body/div[3]/div[1]/div[1]/div[1]/div[1]/div[1]/div[2]/div[3]", - "allXPaths": [ - "/html/body/div[3]/div[1]/div[1]/div[1]/div[1]/div[1]/div[2]/div[3]", - "//div[contains(., '作曲 : Frédé')]", - "id(\"lyric-content\")", - "//DIV[@class='bd bd-open f-brk f-ib']", - "/html/body/div[last()-10]/div[last()-1]/div/div/div[last()-1]/div[last()-1]/div/div" - ], - "exampleValues": [ - { - "num": 0, - "value": "作曲 : Frédéric François Chopin纯音乐,请欣赏" - } - ], - "unique_index": "wo55mnquaokljnha0rx", - "iframe": true, - "default": "", - "beforeJS": "", - "beforeJSWaitTime": 0, - "JS": "", - "JSWaitTime": 0, - "afterJS": "", - "afterJSWaitTime": 0, - "downloadPic": 0 - } - ] - } - }, - { - "id": 4, - "index": 12, - "parentId": 0, - "type": 1, - "option": 8, - "title": "循环", - "sequence": [13, 14], - "isInLoop": false, - "position": 3, - "parameters": { - "history": 4, - "tabIndex": -1, - "useLoop": false, - "xpath": "/html/body/div[3]/div[1]/div[1]/div[1]/div[2]/div[1]/div[2]/div[2]/div", - "iframe": true, - "wait": 0, - "waitType": 0, - "beforeJS": "", - "beforeJSWaitTime": 0, - "afterJS": "", - "afterJSWaitTime": 0, - "scrollType": 0, - "scrollCount": 1, - "scrollWaitTime": 1, - "loopType": 1, - "pathList": "", - "textList": "", - "code": "", - "waitTime": 0, - "exitCount": 0, - "historyWait": 2, - "breakMode": 0, - "breakCode": "", - "breakCodeWaitTime": 0, - "allXPaths": [ - "/html/body/div[3]/div[1]/div[1]/div[1]/div[2]/div[1]/div[2]/div[2]/div[1]", - "//div[contains(., '新鑫曼巴:建议这种纯')]", - "id(\"1430545231688426048755\")", - "//DIV[@class='itm']", - "/html/body/div[last()-10]/div[last()-1]/div/div/div/div/div/div[last()-1]/div[last()-34]" - ] - } - }, - { - "id": 5, - "index": 13, - "parentId": 4, - "type": 0, - "option": 3, - "title": "提取数据", - "sequence": [], - "isInLoop": true, - "position": 0, - "parameters": { - "history": 4, - "tabIndex": -1, - "useLoop": false, - "xpath": "", - "iframe": true, - "wait": 0, - "waitType": 0, - "beforeJS": "", - "beforeJSWaitTime": 0, - "afterJS": "", - "afterJSWaitTime": 0, - "params": [ - { - "nodeType": 1, - "contentType": 0, - "relative": true, - "name": "参数3_链接文本", - "desc": "", - "relativeXPath": "/div[1]/a[1]", - "allXPaths": [ - "/div[1]/a[1]", - "//a[contains(., '')]", - "/html/body/div[last()-10]/div[last()-1]/div/div/div/div/div/div[last()-1]/div[last()-34]/div[last()-1]/a" - ], - "exampleValues": [{ "num": 0, "value": "" }], - "unique_index": "/div[1]/a[1]", - "iframe": true, - "default": "", - "beforeJS": "", - "beforeJSWaitTime": 0, - "JS": "", - "JSWaitTime": 0, - "afterJS": "", - "afterJSWaitTime": 0, - "downloadPic": 0 - }, - { - "nodeType": 2, - "contentType": 0, - "relative": true, - "name": "参数4_链接地址", - "desc": "", - "relativeXPath": "/div[1]/a[1]", - "allXPaths": [ - "/div[1]/a[1]", - "//a[contains(., '')]", - "/html/body/div[last()-10]/div[last()-1]/div/div/div/div/div/div[last()-1]/div[last()-34]/div[last()-1]/a" - ], - "exampleValues": [{ "num": 0, "value": "/user/home?id=6622403" }], - "unique_index": "/div[1]/a[1]", - "iframe": true, - "default": "", - "beforeJS": "", - "beforeJSWaitTime": 0, - "JS": "", - "JSWaitTime": 0, - "afterJS": "", - "afterJSWaitTime": 0, - "downloadPic": 0 - }, - { - "nodeType": 4, - "contentType": 1, - "relative": true, - "name": "参数5_图片地址", - "desc": "", - "relativeXPath": "/div[1]/a[1]/img[1]", - "allXPaths": [ - "/div[1]/a[1]/img[1]", - "//img[contains(., '')]", - "/html/body/div[last()-10]/div[last()-1]/div/div/div/div/div/div[last()-1]/div[last()-34]/div[last()-1]/a/img" - ], - "exampleValues": [ - { - "num": 0, - "value": "http://p2.music.126.net/XM9AGb0vN4OSKK4WeZM7aA==/109951165633941106.jpg?param=50y50" - } - ], - "unique_index": "/div[1]/a[1]/img[1]", - "iframe": true, - "default": "", - "beforeJS": "", - "beforeJSWaitTime": 0, - "JS": "", - "JSWaitTime": 0, - "afterJS": "", - "afterJSWaitTime": 0, - "downloadPic": 0 - }, - { - "nodeType": 0, - "contentType": 1, - "relative": true, - "name": "参数6_文本", - "desc": "", - "relativeXPath": "/div[2]/div[1]/div[1]", - "allXPaths": [ - "/div[2]/div[1]/div[1]", - "//div[contains(., '新鑫曼巴:建议这种纯')]", - "//DIV[@class='cnt f-brk']", - "/html/body/div[last()-10]/div[last()-1]/div/div/div/div/div/div[last()-1]/div[last()-34]/div/div[last()-1]/div" - ], - "exampleValues": [ - { "num": 0, "value": ":建议这种纯音乐,小编在歌词中做简介" } - ], - "unique_index": "/div[2]/div[1]/div[1]", - "iframe": true, - "default": "", - "beforeJS": "", - "beforeJSWaitTime": 0, - "JS": "", - "JSWaitTime": 0, - "afterJS": "", - "afterJSWaitTime": 0, - "downloadPic": 0 - }, - { - "nodeType": 1, - "contentType": 0, - "relative": true, - "name": "参数7_链接文本", - "desc": "", - "relativeXPath": "/div[2]/div[1]/div[1]/a[1]", - "allXPaths": [ - "/div[2]/div[1]/div[1]/a[1]", - "//a[contains(., '新鑫曼巴')]", - "//A[@class='s-fc7']", - "/html/body/div[last()-10]/div[last()-1]/div/div/div/div/div/div[last()-1]/div[last()-34]/div/div[last()-1]/div/a" - ], - "exampleValues": [{ "num": 0, "value": "新鑫曼巴" }], - "unique_index": "/div[2]/div[1]/div[1]/a[1]", - "iframe": true, - "default": "", - "beforeJS": "", - "beforeJSWaitTime": 0, - "JS": "", - "JSWaitTime": 0, - "afterJS": "", - "afterJSWaitTime": 0, - "downloadPic": 0 - }, - { - "nodeType": 2, - "contentType": 0, - "relative": true, - "name": "参数8_链接地址", - "desc": "", - "relativeXPath": "/div[2]/div[1]/div[1]/a[1]", - "allXPaths": [ - "/div[2]/div[1]/div[1]/a[1]", - "//a[contains(., '新鑫曼巴')]", - "//A[@class='s-fc7']", - "/html/body/div[last()-10]/div[last()-1]/div/div/div/div/div/div[last()-1]/div[last()-34]/div/div[last()-1]/div/a" - ], - "exampleValues": [{ "num": 0, "value": "/user/home?id=6622403" }], - "unique_index": "/div[2]/div[1]/div[1]/a[1]", - "iframe": true, - "default": "", - "beforeJS": "", - "beforeJSWaitTime": 0, - "JS": "", - "JSWaitTime": 0, - "afterJS": "", - "afterJSWaitTime": 0, - "downloadPic": 0 - }, - { - "nodeType": 4, - "contentType": 1, - "relative": true, - "name": "参数9_图片地址", - "desc": "", - "relativeXPath": "/div[2]/div[1]/div[1]/img[1]", - "allXPaths": [ - "/div[2]/div[1]/div[1]/img[1]", - "//img[contains(., '')]", - "//IMG[@class='brand-tag brand-vip']", - "/html/body/div[last()-10]/div[last()-1]/div/div/div/div/div/div[last()-1]/div[last()-34]/div/div[last()-1]/div/img" - ], - "exampleValues": [ - { - "num": 0, - "value": "http://p5.music.126.net/obj/wovDmcKXw6PCn2_CmsOk/17941162599/305d/0dee/968a/22f0de72becf0485ecac1d6a5898825a.png" - } - ], - "unique_index": "/div[2]/div[1]/div[1]/img[1]", - "iframe": true, - "default": "", - "beforeJS": "", - "beforeJSWaitTime": 0, - "JS": "", - "JSWaitTime": 0, - "afterJS": "", - "afterJSWaitTime": 0, - "downloadPic": 0 - }, - { - "nodeType": 0, - "contentType": 1, - "relative": true, - "name": "参数10_文本", - "desc": "", - "relativeXPath": "/div[2]/div[2]/div[1]", - "allXPaths": [ - "/div[2]/div[2]/div[1]", - "//div[contains(., '2016年4月18日')]", - "//DIV[@class='time s-fc4']", - "/html/body/div[last()-10]/div[last()-1]/div/div/div/div/div/div[last()-1]/div[last()-34]/div/div/div" - ], - "exampleValues": [{ "num": 0, "value": "2016年4月18日" }], - "unique_index": "/div[2]/div[2]/div[1]", - "iframe": true, - "default": "", - "beforeJS": "", - "beforeJSWaitTime": 0, - "JS": "", - "JSWaitTime": 0, - "afterJS": "", - "afterJSWaitTime": 0, - "downloadPic": 0 - }, - { - "nodeType": 1, - "contentType": 0, - "relative": true, - "name": "参数11_链接文本", - "desc": "", - "relativeXPath": "/div[2]/div[2]/span[1]/span[1]/a[1]", - "allXPaths": [ - "/div[2]/div[2]/span[1]/span[1]/a[1]", - "//a[contains(., '删除')]", - "//A[@class='s-fc3']", - "/html/body/div[last()-10]/div[last()-1]/div/div/div/div/div/div[last()-1]/div[last()-34]/div/div/span[last()-1]/span/a" - ], - "exampleValues": [{ "num": 0, "value": "删除" }], - "unique_index": "/div[2]/div[2]/span[1]/span[1]/a[1]", - "iframe": true, - "default": "", - "beforeJS": "", - "beforeJSWaitTime": 0, - "JS": "", - "JSWaitTime": 0, - "afterJS": "", - "afterJSWaitTime": 0, - "downloadPic": 0 - }, - { - "nodeType": 2, - "contentType": 0, - "relative": true, - "name": "参数12_链接地址", - "desc": "", - "relativeXPath": "/div[2]/div[2]/span[1]/span[1]/a[1]", - "allXPaths": [ - "/div[2]/div[2]/span[1]/span[1]/a[1]", - "//a[contains(., '删除')]", - "//A[@class='s-fc3']", - "/html/body/div[last()-10]/div[last()-1]/div/div/div/div/div/div[last()-1]/div[last()-34]/div/div/span[last()-1]/span/a" - ], - "exampleValues": [{ "num": 0, "value": "javascript:void(0)" }], - "unique_index": "/div[2]/div[2]/span[1]/span[1]/a[1]", - "iframe": true, - "default": "", - "beforeJS": "", - "beforeJSWaitTime": 0, - "JS": "", - "JSWaitTime": 0, - "afterJS": "", - "afterJSWaitTime": 0, - "downloadPic": 0 - }, - { - "nodeType": 0, - "contentType": 1, - "relative": true, - "name": "参数13_文本", - "desc": "", - "relativeXPath": "/div[2]/div[2]/span[1]/span[1]/span[1]", - "allXPaths": [ - "/div[2]/div[2]/span[1]/span[1]/span[1]", - "//span[contains(., '|')]", - "//SPAN[@class='sep']", - "/html/body/div[last()-10]/div[last()-1]/div/div/div/div/div/div[last()-1]/div[last()-34]/div/div/span[last()-1]/span/span" - ], - "exampleValues": [{ "num": 0, "value": "|" }], - "unique_index": "/div[2]/div[2]/span[1]/span[1]/span[1]", - "iframe": true, - "default": "", - "beforeJS": "", - "beforeJSWaitTime": 0, - "JS": "", - "JSWaitTime": 0, - "afterJS": "", - "afterJSWaitTime": 0, - "downloadPic": 0 - }, - { - "nodeType": 1, - "contentType": 0, - "relative": true, - "name": "参数14_链接文本", - "desc": "", - "relativeXPath": "/div[2]/div[2]/a[1]", - "allXPaths": [ - "/div[2]/div[2]/a[1]", - "//a[contains(., '(29844)')]", - "/html/body/div[last()-10]/div[last()-1]/div/div/div/div/div/div[last()-1]/div[last()-34]/div/div/a[last()-1]" - ], - "exampleValues": [{ "num": 0, "value": " (29844)" }], - "unique_index": "/div[2]/div[2]/a[1]", - "iframe": true, - "default": "", - "beforeJS": "", - "beforeJSWaitTime": 0, - "JS": "", - "JSWaitTime": 0, - "afterJS": "", - "afterJSWaitTime": 0, - "downloadPic": 0 - }, - { - "nodeType": 2, - "contentType": 0, - "relative": true, - "name": "参数15_链接地址", - "desc": "", - "relativeXPath": "/div[2]/div[2]/a[1]", - "allXPaths": [ - "/div[2]/div[2]/a[1]", - "//a[contains(., '(29844)')]", - "/html/body/div[last()-10]/div[last()-1]/div/div/div/div/div/div[last()-1]/div[last()-34]/div/div/a[last()-1]" - ], - "exampleValues": [{ "num": 0, "value": "javascript:void(0)" }], - "unique_index": "/div[2]/div[2]/a[1]", - "iframe": true, - "default": "", - "beforeJS": "", - "beforeJSWaitTime": 0, - "JS": "", - "JSWaitTime": 0, - "afterJS": "", - "afterJSWaitTime": 0, - "downloadPic": 0 - }, - { - "nodeType": 0, - "contentType": 1, - "relative": true, - "name": "参数16_文本", - "desc": "", - "relativeXPath": "/div[2]/div[2]/span[2]", - "allXPaths": [ - "/div[2]/div[2]/span[2]", - "//span[contains(., '|')]", - "//SPAN[@class='sep']", - "/html/body/div[last()-10]/div[last()-1]/div/div/div/div/div/div[last()-1]/div[last()-34]/div/div/span" - ], - "exampleValues": [{ "num": 0, "value": "|" }], - "unique_index": "/div[2]/div[2]/span[2]", - "iframe": true, - "default": "", - "beforeJS": "", - "beforeJSWaitTime": 0, - "JS": "", - "JSWaitTime": 0, - "afterJS": "", - "afterJSWaitTime": 0, - "downloadPic": 0 - }, - { - "nodeType": 1, - "contentType": 0, - "relative": true, - "name": "参数17_链接文本", - "desc": "", - "relativeXPath": "/div[2]/div[2]/a[2]", - "allXPaths": [ - "/div[2]/div[2]/a[2]", - "//a[contains(., '回复')]", - "//A[@class='s-fc3']", - "/html/body/div[last()-10]/div[last()-1]/div/div/div/div/div/div[last()-1]/div[last()-34]/div/div/a" - ], - "exampleValues": [{ "num": 0, "value": "回复" }], - "unique_index": "/div[2]/div[2]/a[2]", - "iframe": true, - "default": "", - "beforeJS": "", - "beforeJSWaitTime": 0, - "JS": "", - "JSWaitTime": 0, - "afterJS": "", - "afterJSWaitTime": 0, - "downloadPic": 0 - }, - { - "nodeType": 2, - "contentType": 0, - "relative": true, - "name": "参数18_链接地址", - "desc": "", - "relativeXPath": "/div[2]/div[2]/a[2]", - "allXPaths": [ - "/div[2]/div[2]/a[2]", - "//a[contains(., '回复')]", - "//A[@class='s-fc3']", - "/html/body/div[last()-10]/div[last()-1]/div/div/div/div/div/div[last()-1]/div[last()-34]/div/div/a" - ], - "exampleValues": [{ "num": 0, "value": "javascript:void(0)" }], - "unique_index": "/div[2]/div[2]/a[2]", - "iframe": true, - "default": "", - "beforeJS": "", - "beforeJSWaitTime": 0, - "JS": "", - "JSWaitTime": 0, - "afterJS": "", - "afterJSWaitTime": 0, - "downloadPic": 0 - }, - { - "nodeType": 0, - "contentType": 1, - "relative": true, - "name": "参数19_文本", - "desc": "", - "relativeXPath": "/div[2]/div[2]", - "allXPaths": [ - "/div[2]/div[2]", - "//div[contains(., '◆◆_Being_:')]", - "//DIV[@class='que f-brk f-pr s-fc3']", - "/html/body/div[last()-10]/div[last()-1]/div/div/div/div/div/div[last()-1]/div[last()-28]/div/div[last()-1]" - ], - "exampleValues": [ - { - "num": 6, - "value": ":有次我在琴房练琴,练的是一首通俗歌曲改编的钢琴曲。正当我沉醉于自己的琴声时,隔壁忽然传来这首夜曲,那一刻我突然觉得自己练的曲子简直是没法听,于是后半段就没练,坐在琴房听隔壁弹了一个小时夜曲。" - } - ], - "unique_index": "/div[2]/div[2]", - "iframe": true, - "default": "", - "beforeJS": "", - "beforeJSWaitTime": 0, - "JS": "", - "JSWaitTime": 0, - "afterJS": "", - "afterJSWaitTime": 0, - "downloadPic": 0 - }, - { - "nodeType": 0, - "contentType": 1, - "relative": true, - "name": "参数20_文本", - "desc": "", - "relativeXPath": "/div[2]/div[2]/span[1]/i[1]", - "allXPaths": [ - "/div[2]/div[2]/span[1]/i[1]", - "//i[contains(., '◆')]", - "//I[@class='bd']", - "/html/body/div[last()-10]/div[last()-1]/div/div/div/div/div/div[last()-1]/div[last()-28]/div/div[last()-1]/span/i[last()-1]" - ], - "exampleValues": [{ "num": 6, "value": "◆" }], - "unique_index": "/div[2]/div[2]/span[1]/i[1]", - "iframe": true, - "default": "", - "beforeJS": "", - "beforeJSWaitTime": 0, - "JS": "", - "JSWaitTime": 0, - "afterJS": "", - "afterJSWaitTime": 0, - "downloadPic": 0 - }, - { - "nodeType": 0, - "contentType": 1, - "relative": true, - "name": "参数21_文本", - "desc": "", - "relativeXPath": "/div[2]/div[2]/span[1]/i[2]", - "allXPaths": [ - "/div[2]/div[2]/span[1]/i[2]", - "//i[contains(., '◆')]", - "//I[@class='bg']", - "/html/body/div[last()-10]/div[last()-1]/div/div/div/div/div/div[last()-1]/div[last()-28]/div/div[last()-1]/span/i" - ], - "exampleValues": [{ "num": 6, "value": "◆" }], - "unique_index": "/div[2]/div[2]/span[1]/i[2]", - "iframe": true, - "default": "", - "beforeJS": "", - "beforeJSWaitTime": 0, - "JS": "", - "JSWaitTime": 0, - "afterJS": "", - "afterJSWaitTime": 0, - "downloadPic": 0 - }, - { - "nodeType": 0, - "contentType": 1, - "relative": true, - "name": "参数22_文本", - "desc": "", - "relativeXPath": "/div[2]/div[3]/div[1]", - "allXPaths": [ - "/div[2]/div[3]/div[1]", - "//div[contains(., '2016年4月24日')]", - "//DIV[@class='time s-fc4']", - "/html/body/div[last()-10]/div[last()-1]/div/div/div/div/div/div[last()-1]/div[last()-28]/div/div/div" - ], - "exampleValues": [{ "num": 6, "value": "2016年4月24日" }], - "unique_index": "/div[2]/div[3]/div[1]", - "iframe": true, - "default": "", - "beforeJS": "", - "beforeJSWaitTime": 0, - "JS": "", - "JSWaitTime": 0, - "afterJS": "", - "afterJSWaitTime": 0, - "downloadPic": 0 - }, - { - "nodeType": 1, - "contentType": 0, - "relative": true, - "name": "参数23_链接文本", - "desc": "", - "relativeXPath": "/div[2]/div[3]/span[1]/span[1]/a[1]", - "allXPaths": [ - "/div[2]/div[3]/span[1]/span[1]/a[1]", - "//a[contains(., '删除')]", - "//A[@class='s-fc3']", - "/html/body/div[last()-10]/div[last()-1]/div/div/div/div/div/div[last()-1]/div[last()-28]/div/div/span[last()-1]/span/a" - ], - "exampleValues": [{ "num": 6, "value": "删除" }], - "unique_index": "/div[2]/div[3]/span[1]/span[1]/a[1]", - "iframe": true, - "default": "", - "beforeJS": "", - "beforeJSWaitTime": 0, - "JS": "", - "JSWaitTime": 0, - "afterJS": "", - "afterJSWaitTime": 0, - "downloadPic": 0 - }, - { - "nodeType": 2, - "contentType": 0, - "relative": true, - "name": "参数24_链接地址", - "desc": "", - "relativeXPath": "/div[2]/div[3]/span[1]/span[1]/a[1]", - "allXPaths": [ - "/div[2]/div[3]/span[1]/span[1]/a[1]", - "//a[contains(., '删除')]", - "//A[@class='s-fc3']", - "/html/body/div[last()-10]/div[last()-1]/div/div/div/div/div/div[last()-1]/div[last()-28]/div/div/span[last()-1]/span/a" - ], - "exampleValues": [{ "num": 6, "value": "javascript:void(0)" }], - "unique_index": "/div[2]/div[3]/span[1]/span[1]/a[1]", - "iframe": true, - "default": "", - "beforeJS": "", - "beforeJSWaitTime": 0, - "JS": "", - "JSWaitTime": 0, - "afterJS": "", - "afterJSWaitTime": 0, - "downloadPic": 0 - }, - { - "nodeType": 0, - "contentType": 1, - "relative": true, - "name": "参数25_文本", - "desc": "", - "relativeXPath": "/div[2]/div[3]/span[1]/span[1]/span[1]", - "allXPaths": [ - "/div[2]/div[3]/span[1]/span[1]/span[1]", - "//span[contains(., '|')]", - "//SPAN[@class='sep']", - "/html/body/div[last()-10]/div[last()-1]/div/div/div/div/div/div[last()-1]/div[last()-28]/div/div/span[last()-1]/span/span" - ], - "exampleValues": [{ "num": 6, "value": "|" }], - "unique_index": "/div[2]/div[3]/span[1]/span[1]/span[1]", - "iframe": true, - "default": "", - "beforeJS": "", - "beforeJSWaitTime": 0, - "JS": "", - "JSWaitTime": 0, - "afterJS": "", - "afterJSWaitTime": 0, - "downloadPic": 0 - }, - { - "nodeType": 1, - "contentType": 0, - "relative": true, - "name": "参数26_链接文本", - "desc": "", - "relativeXPath": "/div[2]/div[3]/a[1]", - "allXPaths": [ - "/div[2]/div[3]/a[1]", - "//a[contains(., '(7809)')]", - "/html/body/div[last()-10]/div[last()-1]/div/div/div/div/div/div[last()-1]/div[last()-28]/div/div/a[last()-1]" - ], - "exampleValues": [{ "num": 6, "value": " (7809)" }], - "unique_index": "/div[2]/div[3]/a[1]", - "iframe": true, - "default": "", - "beforeJS": "", - "beforeJSWaitTime": 0, - "JS": "", - "JSWaitTime": 0, - "afterJS": "", - "afterJSWaitTime": 0, - "downloadPic": 0 - }, - { - "nodeType": 2, - "contentType": 0, - "relative": true, - "name": "参数27_链接地址", - "desc": "", - "relativeXPath": "/div[2]/div[3]/a[1]", - "allXPaths": [ - "/div[2]/div[3]/a[1]", - "//a[contains(., '(7809)')]", - "/html/body/div[last()-10]/div[last()-1]/div/div/div/div/div/div[last()-1]/div[last()-28]/div/div/a[last()-1]" - ], - "exampleValues": [{ "num": 6, "value": "javascript:void(0)" }], - "unique_index": "/div[2]/div[3]/a[1]", - "iframe": true, - "default": "", - "beforeJS": "", - "beforeJSWaitTime": 0, - "JS": "", - "JSWaitTime": 0, - "afterJS": "", - "afterJSWaitTime": 0, - "downloadPic": 0 - }, - { - "nodeType": 0, - "contentType": 1, - "relative": true, - "name": "参数28_文本", - "desc": "", - "relativeXPath": "/div[2]/div[3]/span[2]", - "allXPaths": [ - "/div[2]/div[3]/span[2]", - "//span[contains(., '|')]", - "//SPAN[@class='sep']", - "/html/body/div[last()-10]/div[last()-1]/div/div/div/div/div/div[last()-1]/div[last()-28]/div/div/span" - ], - "exampleValues": [{ "num": 6, "value": "|" }], - "unique_index": "/div[2]/div[3]/span[2]", - "iframe": true, - "default": "", - "beforeJS": "", - "beforeJSWaitTime": 0, - "JS": "", - "JSWaitTime": 0, - "afterJS": "", - "afterJSWaitTime": 0, - "downloadPic": 0 - }, - { - "nodeType": 1, - "contentType": 0, - "relative": true, - "name": "参数29_链接文本", - "desc": "", - "relativeXPath": "/div[2]/div[3]/a[2]", - "allXPaths": [ - "/div[2]/div[3]/a[2]", - "//a[contains(., '回复')]", - "//A[@class='s-fc3']", - "/html/body/div[last()-10]/div[last()-1]/div/div/div/div/div/div[last()-1]/div[last()-28]/div/div/a" - ], - "exampleValues": [{ "num": 6, "value": "回复" }], - "unique_index": "/div[2]/div[3]/a[2]", - "iframe": true, - "default": "", - "beforeJS": "", - "beforeJSWaitTime": 0, - "JS": "", - "JSWaitTime": 0, - "afterJS": "", - "afterJSWaitTime": 0, - "downloadPic": 0 - }, - { - "nodeType": 2, - "contentType": 0, - "relative": true, - "name": "参数30_链接地址", - "desc": "", - "relativeXPath": "/div[2]/div[3]/a[2]", - "allXPaths": [ - "/div[2]/div[3]/a[2]", - "//a[contains(., '回复')]", - "//A[@class='s-fc3']", - "/html/body/div[last()-10]/div[last()-1]/div/div/div/div/div/div[last()-1]/div[last()-28]/div/div/a" - ], - "exampleValues": [{ "num": 6, "value": "javascript:void(0)" }], - "unique_index": "/div[2]/div[3]/a[2]", - "iframe": true, - "default": "", - "beforeJS": "", - "beforeJSWaitTime": 0, - "JS": "", - "JSWaitTime": 0, - "afterJS": "", - "afterJSWaitTime": 0, - "downloadPic": 0 - }, - { - "nodeType": 4, - "contentType": 1, - "relative": true, - "name": "参数31_图片地址", - "desc": "", - "relativeXPath": "/div[2]/div[2]/img[1]", - "allXPaths": [ - "/div[2]/div[2]/img[1]", - "//img[contains(., '')]", - "/html/body/div[last()-10]/div[last()-1]/div/div/div/div/div/div[last()-1]/div[last()-19]/div/div[last()-1]/img" - ], - "exampleValues": [ - { - "num": 15, - "value": "http://s1.music.126.net/style/web2/emt/emoji_13.png" - } - ], - "unique_index": "/div[2]/div[2]/img[1]", - "iframe": true, - "default": "", - "beforeJS": "", - "beforeJSWaitTime": 0, - "JS": "", - "JSWaitTime": 0, - "afterJS": "", - "afterJSWaitTime": 0, - "downloadPic": 0 - }, - { - "nodeType": 4, - "contentType": 1, - "relative": true, - "name": "参数32_图片地址", - "desc": "", - "relativeXPath": "/div[2]/div[1]/div[1]/img[2]", - "allXPaths": [ - "/div[2]/div[1]/div[1]/img[2]", - "//img[contains(., '')]", - "//IMG[@class='brand-tag brand-package']", - "/html/body/div[last()-10]/div[last()-1]/div/div/div/div/div/div[last()-1]/div[last()-3]/div/div[last()-1]/div/img" - ], - "exampleValues": [ - { - "num": 31, - "value": "https://p5.music.126.net/obj/wonDlsKUwrLClGjCm8Kx/21892874340/50e6/e81d/5292/2d693cbb98954e28d4d9fdb11be99a8b.png" - } - ], - "unique_index": "/div[2]/div[1]/div[1]/img[2]", + "exampleValues": [{ "num": 1, "value": "参考位置" }], + "unique_index": "/th[6]", "iframe": true, "default": "", + "paraType": "text", + "recordASField": 1, "beforeJS": "", "beforeJSWaitTime": 0, "JS": "", @@ -2548,18 +879,235 @@ } }, { - "id": 6, + "id": -1, + "index": 9, + "parentId": 5, + "type": 2, + "option": 9, + "title": "判断条件", + "sequence": [10], + "isInLoop": true, + "position": 1, + "parameters": { + "history": 1, + "tabIndex": 0, + "useLoop": false, + "xpath": "", + "iframe": false, + "wait": 0, + "waitType": 0, + "beforeJS": "", + "beforeJSWaitTime": 0, + "afterJS": "", + "afterJSWaitTime": 0 + } + }, + { + "id": -1, + "parentId": 9, + "index": 10, + "type": 3, + "option": 10, + "title": "条件分支", + "sequence": [16], + "isInLoop": true, + "parameters": { + "history": 1, + "tabIndex": 0, + "useLoop": false, + "xpath": "", + "iframe": false, + "wait": 0, + "waitType": 0, + "beforeJS": "", + "beforeJSWaitTime": 0, + "afterJS": "", + "afterJSWaitTime": 0, + "class": "3", + "value": "日本", + "code": "", + "waitTime": 0 + }, + "position": 0 + }, + { + "id": -1, + "parentId": 9, + "index": 11, + "type": 3, + "option": 10, + "title": "条件分支", + "sequence": [], + "isInLoop": true, + "parameters": { + "history": 1, + "tabIndex": 0, + "useLoop": false, + "xpath": "", + "iframe": false, + "wait": 0, + "waitType": 0, + "beforeJS": "", + "beforeJSWaitTime": 0, + "afterJS": "", + "afterJSWaitTime": 0, + "class": 0, + "value": "", + "code": "", + "waitTime": 0 + }, + "position": 1 + }, + { + "index": 12, + "id": -1, + "parentId": 9, + "type": 3, + "option": 10, + "title": "条件分支", + "sequence": [13], + "isInLoop": true, + "parameters": { + "history": 1, + "tabIndex": 0, + "useLoop": false, + "xpath": "", + "iframe": false, + "wait": 0, + "waitType": 0, + "beforeJS": "", + "beforeJSWaitTime": 0, + "afterJS": "", + "afterJSWaitTime": 0, + "class": 0, + "value": "", + "code": "", + "waitTime": 0 + }, + "position": 0 + }, + { + "id": -1, + "index": 13, + "parentId": 10, + "type": 2, + "option": 9, + "title": "条件分支", + "sequence": [14, 15], + "isInLoop": true, + "position": 0, + "parameters": { + "history": 1, + "tabIndex": 0, + "useLoop": false, + "xpath": "", + "iframe": false, + "wait": 0, + "waitType": 0, + "beforeJS": "", + "beforeJSWaitTime": 0, + "afterJS": "", + "afterJSWaitTime": 0 + } + }, + { + "id": -1, + "parentId": 13, "index": 14, - "parentId": 4, + "type": 3, + "option": 10, + "title": "条件分支", + "sequence": [], + "isInLoop": true, + "parameters": { + "history": 1, + "tabIndex": 0, + "useLoop": false, + "xpath": "", + "iframe": false, + "wait": 0, + "waitType": 0, + "beforeJS": "", + "beforeJSWaitTime": 0, + "afterJS": "", + "afterJSWaitTime": 0, + "class": 0, + "value": "", + "code": "", + "waitTime": 0 + }, + "position": 0 + }, + { + "id": -1, + "parentId": 13, + "index": 15, + "type": 3, + "option": 10, + "title": "条件分支", + "sequence": [], + "isInLoop": true, + "parameters": { + "history": 1, + "tabIndex": 0, + "useLoop": false, + "xpath": "", + "iframe": false, + "wait": 0, + "waitType": 0, + "beforeJS": "", + "beforeJSWaitTime": 0, + "afterJS": "", + "afterJSWaitTime": 0, + "class": 0, + "value": "", + "code": "", + "waitTime": 0 + }, + "position": 1 + }, + { + "id": -1, + "index": 16, + "parentId": 11, "type": 0, - "option": 3, - "title": "提取数据", + "option": 5, + "title": "Break", "sequence": [], "isInLoop": true, + "position": 0, + "parameters": { + "history": 1, + "tabIndex": 0, + "useLoop": false, + "xpath": "", + "iframe": false, + "wait": 0, + "waitType": 0, + "beforeJS": "", + "beforeJSWaitTime": 0, + "afterJS": "", + "afterJSWaitTime": 0, + "codeMode": "3", + "code": "", + "waitTime": 0, + "recordASField": 0, + "paraType": "text" + } + }, + { + "id": -1, + "index": 17, + "parentId": 4, + "type": 2, + "option": 9, + "title": "判断条件", + "sequence": [18], + "isInLoop": true, "position": 1, "parameters": { - "history": 4, - "tabIndex": -1, + "history": 1, + "tabIndex": 0, "useLoop": false, "xpath": "", "iframe": false, @@ -2568,35 +1116,121 @@ "beforeJS": "", "beforeJSWaitTime": 0, "afterJS": "", + "afterJSWaitTime": 0 + } + }, + { + "id": -1, + "parentId": 6, + "index": 18, + "type": 3, + "option": 10, + "title": "条件分支", + "sequence": [20], + "isInLoop": true, + "parameters": { + "history": 1, + "tabIndex": 0, + "useLoop": false, + "xpath": "", + "iframe": true, + "wait": 0, + "waitType": 0, + "beforeJS": "", + "beforeJSWaitTime": 0, + "afterJS": "", "afterJSWaitTime": 0, - "params": [ - { - "nodeType": 1, - "contentType": 0, - "relative": false, - "name": "参数33_链接文本", - "desc": "", - "extractType": 0, - "relativeXPath": "/html/body/div[1]/div[1]/div[1]/h1[1]/a[1]", - "allXPaths": [ - "/html/body/div[1]/div[1]/div[1]/h1[1]/a[1]", - "//a[contains(., '网易云音乐')]", - "/html/body/div[last()-7]/div[last()-2]/div/h1/a" - ], - "exampleValues": [{ "num": 0, "value": "网易云音乐" }], - "unique_index": "3mjhotxlh4mljnhapl0", - "iframe": false, - "default": "", - "beforeJS": "", - "beforeJSWaitTime": 0, - "JS": "", - "JSWaitTime": 0, - "afterJS": "", - "afterJSWaitTime": 0, - "downloadPic": 0 - } - ] + "class": "5", + "value": "哥伦比亚", + "code": "return document.body.innerText.includes(\"哥伦比亚\")", + "waitTime": 0 + }, + "position": 0 + }, + { + "id": -1, + "parentId": 7, + "index": 19, + "type": 3, + "option": 10, + "title": "条件分支", + "sequence": [], + "isInLoop": true, + "parameters": { + "history": 1, + "tabIndex": 0, + "useLoop": false, + "xpath": "", + "iframe": false, + "wait": 0, + "waitType": 0, + "beforeJS": "", + "beforeJSWaitTime": 0, + "afterJS": "", + "afterJSWaitTime": 0, + "class": 0, + "value": "", + "code": "", + "waitTime": 0 + }, + "position": 1 + }, + { + "id": -1, + "index": 20, + "parentId": 9, + "type": 0, + "option": 5, + "title": "退出循环", + "sequence": [], + "isInLoop": true, + "position": 0, + "parameters": { + "history": 1, + "tabIndex": 0, + "useLoop": false, + "xpath": "", + "iframe": true, + "wait": 0, + "waitType": 0, + "beforeJS": "", + "beforeJSWaitTime": 0, + "afterJS": "", + "afterJSWaitTime": 0, + "codeMode": "3", + "code": "", + "waitTime": 0, + "recordASField": 0, + "paraType": "text" } + }, + { + "index": 21, + "id": -1, + "parentId": 6, + "type": 3, + "option": 10, + "title": "条件分支", + "sequence": [], + "isInLoop": true, + "parameters": { + "history": 1, + "tabIndex": 0, + "useLoop": false, + "xpath": "", + "iframe": false, + "wait": 0, + "waitType": 0, + "beforeJS": "", + "beforeJSWaitTime": 0, + "afterJS": "", + "afterJSWaitTime": 0, + "class": 0, + "value": "", + "code": "", + "waitTime": 0 + }, + "position": 0 } ] } diff --git a/.temp_to_pub/EasySpider_Linux_x64/tasks/149.json b/.temp_to_pub/EasySpider_Linux_x64/tasks/149.json index 3083292d..5d094923 100644 --- a/.temp_to_pub/EasySpider_Linux_x64/tasks/149.json +++ b/.temp_to_pub/EasySpider_Linux_x64/tasks/149.json @@ -1 +1 @@ -{"id":149,"name":"京东全球版-专业的综合网上购物商城","url":"https://www.jd.com","links":"https://www.jd.com","create_time":"7/7/2023, 6:36:49 AM","version":"0.3.5","saveThreshold":10,"cloudflare":0,"environment":0,"maxViewLength":15,"outputFormat":"mysql","saveName":"京东","containJudge":false,"desc":"https://www.jd.com","inputParameters":[{"id":0,"name":"urlList_0","nodeId":1,"nodeName":"打开网页","value":"https://www.jd.com","desc":"要采集的网址列表,多行以\\n分开","type":"text","exampleValue":"https://www.jd.com"}],"outputParameters":[{"id":0,"name":"参数1_链接文本","desc":"","type":"text","exampleValue":"手机"},{"id":1,"name":"参数2_链接地址","desc":"","type":"text","exampleValue":"https://shouji.jd.com/"}],"graph":[{"index":0,"id":0,"parentId":0,"type":-1,"option":0,"title":"root","sequence":[1,2],"parameters":{"history":1,"tabIndex":0,"useLoop":false,"xpath":"","wait":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,"url":"https://www.jd.com","links":"https://www.jd.com","maxWaitTime":10,"scrollType":0,"scrollCount":1,"scrollWaitTime":1,"cookies":""}},{"id":2,"index":2,"parentId":0,"type":1,"option":8,"title":"循环","sequence":[3],"isInLoop":false,"position":1,"parameters":{"history":4,"tabIndex":-1,"useLoop":false,"xpath":"/html/body/div[5]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]/div/a","iframe":false,"wait":0,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"scrollType":0,"scrollCount":1,"scrollWaitTime":1,"loopType":1,"pathList":"","textList":"","code":"","waitTime":0,"exitCount":0,"historyWait":2,"breakMode":0,"breakCode":"","breakCodeWaitTime":0,"allXPaths":["/html/body/div[5]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]/a[1]","//a[contains(., '手机')]","/html/body/div[last()-5]/div/div[last()-4]/div/div[last()-2]/div/div/div/div[last()-1]/div[last()-12]/a[last()-1]"]}},{"id":3,"index":3,"parentId":2,"type":0,"option":3,"title":"提取数据","sequence":[],"isInLoop":true,"position":0,"parameters":{"history":4,"tabIndex":-1,"useLoop":false,"xpath":"","iframe":false,"wait":0,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"params":[{"nodeType":1,"contentType":0,"relative":true,"name":"参数1_链接文本","desc":"","extractType":0,"relativeXPath":"","allXPaths":"","exampleValues":[{"num":0,"value":"手机"}],"unique_index":"6h61epq3t9sljrq1vbg","iframe":false,"default":"","paraType":"text","beforeJS":"arguments[0].innerText = \"'\" + arguments[0].innerText + '\"'","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":2,"contentType":0,"relative":true,"name":"参数2_链接地址","desc":"","relativeXPath":"","allXPaths":"","exampleValues":[{"num":0,"value":"https://shouji.jd.com/"}],"unique_index":"6h61epq3t9sljrq1vbg","iframe":false,"default":"","paraType":"text","beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0}],"loopType":1}}]} \ No newline at end of file +{"id":149,"name":"京东全球版-专业的综合网上购物商城","url":"https://www.jd.com","links":"https://www.jd.com","create_time":"7/7/2023, 6:36:49 AM","update_time":"12/20/2023, 4:03:13 AM","version":"0.6.0","saveThreshold":10,"quitWaitTime":60,"environment":0,"maximizeWindow":0,"maxViewLength":15,"recordLog":1,"outputFormat":"mysql","saveName":"京东","dataWriteMode":1,"inputExcel":"","startFromExit":0,"pauseKey":"p","containJudge":false,"browser":"chrome","removeDuplicate":1,"desc":"https://www.jd.com","inputParameters":[{"id":0,"name":"urlList_0","nodeId":1,"nodeName":"打开网页","value":"https://www.jd.com","desc":"List of URLs to be collected, separated by \\n for multiple lines","type":"text","exampleValue":"https://www.jd.com"}],"outputParameters":[{"id":0,"name":"参数1_链接文本","desc":"","type":"text","exampleValue":"手机"},{"id":1,"name":"参数2_链接地址","desc":"","type":"text","exampleValue":"https://shouji.jd.com/"}],"graph":[{"index":0,"id":0,"parentId":0,"type":-1,"option":0,"title":"root","sequence":[1,2],"parameters":{"history":1,"tabIndex":0,"useLoop":false,"xpath":"","wait":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,"url":"https://www.jd.com","links":"https://www.jd.com","maxWaitTime":10,"scrollType":0,"scrollCount":1,"scrollWaitTime":1,"cookies":""}},{"id":2,"index":2,"parentId":0,"type":1,"option":8,"title":"循环","sequence":[3],"isInLoop":false,"position":1,"parameters":{"history":4,"tabIndex":-1,"useLoop":false,"xpath":"/html/body/div[5]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]/div/a","iframe":false,"wait":0,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"scrollType":0,"scrollCount":1,"scrollWaitTime":1,"loopType":1,"pathList":"","textList":"","code":"","waitTime":0,"exitCount":0,"historyWait":2,"breakMode":0,"breakCode":"","breakCodeWaitTime":0,"allXPaths":["/html/body/div[5]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]/a[1]","//a[contains(., '手机')]","/html/body/div[last()-5]/div/div[last()-4]/div/div[last()-2]/div/div/div/div[last()-1]/div[last()-12]/a[last()-1]"]}},{"id":3,"index":3,"parentId":2,"type":0,"option":3,"title":"提取数据","sequence":[],"isInLoop":true,"position":0,"parameters":{"history":4,"tabIndex":-1,"useLoop":false,"xpath":"","iframe":false,"wait":0,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"params":[{"nodeType":1,"contentType":0,"relative":true,"name":"参数1_链接文本","desc":"","extractType":0,"relativeXPath":"","allXPaths":"","exampleValues":[{"num":0,"value":"手机"}],"unique_index":"6h61epq3t9sljrq1vbg","iframe":false,"default":"","paraType":"text","beforeJS":"arguments[0].innerText = \"'\" + arguments[0].innerText + '\"'","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":2,"contentType":0,"relative":true,"name":"参数2_链接地址","desc":"","relativeXPath":"","allXPaths":"","exampleValues":[{"num":0,"value":"https://shouji.jd.com/"}],"unique_index":"6h61epq3t9sljrq1vbg","iframe":false,"default":"","paraType":"text","beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0}],"loopType":1}}]} \ No newline at end of file diff --git a/.temp_to_pub/EasySpider_Linux_x64/tasks/205.json b/.temp_to_pub/EasySpider_Linux_x64/tasks/205.json index a5aba4cd..69fe2d02 100644 --- a/.temp_to_pub/EasySpider_Linux_x64/tasks/205.json +++ b/.temp_to_pub/EasySpider_Linux_x64/tasks/205.json @@ -1 +1 @@ -{"id":205,"name":"京东全球版-专业的综合网上购物商城","url":"https://www.jd.com","links":"https://www.jd.com","create_time":"8/10/2023, 6:19:22 PM","update_time":"8/10/2023, 6:35:26 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.jd.com","inputParameters":[{"id":0,"name":"urlList_0","nodeId":1,"nodeName":"打开网页","value":"https://www.jd.com","desc":"要采集的网址列表,多行以\\n分开","type":"text","exampleValue":"https://www.jd.com"},{"id":1,"name":"loopText_1","nodeId":4,"nodeName":"循环","desc":"要输入的文本/网址,多行以\\n分开","type":"text","exampleValue":"1~2\n3~4","value":"1~2\n3~4"},{"id":2,"name":"inputText_2","nodeName":"输入文字","nodeId":12,"desc":"要输入的文本,如京东搜索框输入:电脑","type":"text","exampleValue":"Field[\"参数2_链接地址\"]+Field[\"自定义操作2\"]","value":"Field[\"参数2_链接地址\"]+Field[\"自定义操作2\"]"}],"outputParameters":[{"id":0,"name":"参数1_链接文本","desc":"","type":"text","recordASField":1,"exampleValue":"手机"},{"id":1,"name":"参数2_链接地址","desc":"","type":"text","recordASField":1,"exampleValue":"https://shouji.jd.com/"},{"id":2,"name":"自定义操作","desc":"自定义操作返回的数据","type":"text","recordASField":0,"exampleValue":""},{"id":3,"name":"自定义操作","desc":"自定义操作返回的数据","type":"text","recordASField":0,"exampleValue":""},{"id":4,"name":"自定义操作2","desc":"自定义操作返回的数据","type":"text","recordASField":0,"exampleValue":""}],"graph":[{"index":0,"id":0,"parentId":0,"type":-1,"option":0,"title":"root","sequence":[1,7,4,8,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.jd.com","links":"https://www.jd.com","maxWaitTime":10,"scrollType":0,"scrollCount":1,"scrollWaitTime":1,"cookies":""}},{"id":5,"index":2,"parentId":0,"type":1,"option":8,"title":"循环","sequence":[3,13,12],"isInLoop":false,"position":4,"parameters":{"history":4,"tabIndex":-1,"useLoop":false,"xpath":"/html/body/div[5]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]/div/a","iframe":false,"wait":0,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"scrollType":0,"scrollCount":1,"scrollWaitTime":1,"loopType":1,"pathList":"","textList":"","code":"","waitTime":0,"exitCount":0,"historyWait":2,"breakMode":0,"breakCode":"","breakCodeWaitTime":0,"allXPaths":["/html/body/div[5]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]/a[1]","//a[contains(., '手机')]","/html/body/div[last()-5]/div/div[last()-4]/div/div[last()-2]/div/div/div/div[last()-1]/div[last()-12]/a[last()-1]"]}},{"id":9,"index":3,"parentId":5,"type":0,"option":3,"title":"提取数据","sequence":[],"isInLoop":true,"position":0,"parameters":{"history":4,"tabIndex":-1,"useLoop":false,"xpath":"","iframe":false,"wait":0,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"clear":0,"params":[{"nodeType":1,"contentType":0,"relative":true,"name":"参数1_链接文本","desc":"","extractType":0,"relativeXPath":"","allXPaths":"","exampleValues":[{"num":0,"value":"手机"}],"unique_index":"hxrjjymdhcll50bpgx","iframe":false,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":2,"contentType":0,"relative":true,"name":"参数2_链接地址","desc":"","relativeXPath":"","allXPaths":"","exampleValues":[{"num":0,"value":"https://shouji.jd.com/"}],"unique_index":"hxrjjymdhcll50bpgx","iframe":false,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0}],"loopType":1}},{"id":3,"index":4,"parentId":0,"type":1,"option":8,"title":"循环","sequence":[6,5,14],"isInLoop":false,"position":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,"scrollType":0,"scrollCount":1,"scrollWaitTime":1,"loopType":"3","pathList":"","textList":"1~2\n3~4","code":"","waitTime":0,"exitCount":0,"historyWait":2,"breakMode":0,"breakCode":"","breakCodeWaitTime":0}},{"id":7,"index":5,"parentId":3,"type":0,"option":4,"title":"输入文字","sequence":[],"isInLoop":true,"position":1,"parameters":{"history":3,"tabIndex":-1,"useLoop":true,"xpath":"//*[@id=\"key\"]","iframe":false,"wait":1,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"value":"","index":1,"allXPaths":["/html/body/div[4]/div[1]/div[2]/div[1]/input[1]","//input[contains(., '')]","id(\"key\")","//INPUT[@class='text defcolor']","/html/body/div[last()-6]/div/div[last()-2]/div/input"]}},{"id":6,"index":6,"parentId":3,"type":0,"option":4,"title":"输入文字","sequence":[],"isInLoop":true,"position":0,"parameters":{"history":1,"tabIndex":0,"useLoop":true,"xpath":"//*[@id=\"key\"]","iframe":false,"wait":1,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"value":"","index":2}},{"id":2,"index":7,"parentId":0,"type":0,"option":5,"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,"codeMode":"5","code":"self.a = 15","waitTime":0,"recordASField":0,"paraType":"text"}},{"id":4,"index":8,"parentId":0,"type":0,"option":5,"title":"自定义操作","sequence":[],"isInLoop":false,"position":3,"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,"codeMode":"5","code":"print(self.a, \"sdf---------------\")\nself.a += 222\nprint(self.a, \"sdf---------------\")","waitTime":0,"recordASField":0,"paraType":"text"}},{"id":-1,"index":9,"parentId":0,"type":2,"option":9,"title":"判断条件","sequence":[10,11],"isInLoop":false,"position":5,"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}},{"id":-1,"parentId":6,"index":10,"type":3,"option":10,"title":"条件分支","sequence":[],"isInLoop":false,"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,"class":0,"value":"","code":"","waitTime":0},"position":0},{"id":-1,"parentId":6,"index":11,"type":3,"option":10,"title":"条件分支","sequence":[],"isInLoop":false,"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,"class":0,"value":"","code":"","waitTime":0},"position":1},{"id":11,"index":12,"parentId":5,"type":0,"option":4,"title":"输入文字","sequence":[],"isInLoop":true,"position":2,"parameters":{"history":1,"tabIndex":0,"useLoop":false,"xpath":"//*[@id=\"key\"]","iframe":false,"wait":0,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"value":"Field[\"参数2_链接地址\"]+Field[\"自定义操作2\"]","index":0}},{"id":10,"index":13,"parentId":5,"type":0,"option":5,"title":"自定义操作2","sequence":[],"isInLoop":true,"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,"codeMode":"6","code":"str(self.a) + \"TEST\"","waitTime":0,"recordASField":0,"paraType":"text"}},{"id":8,"index":14,"parentId":3,"type":0,"option":4,"title":"输入文字","sequence":[],"isInLoop":true,"position":2,"parameters":{"history":1,"tabIndex":0,"useLoop":true,"xpath":"//*[@id=\"key\"]","iframe":false,"wait":1,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"value":"0","index":0}}]} \ No newline at end of file +{"id":205,"name":"京东全球版-专业的综合网上购物商城","url":"https://www.jd.com","links":"https://www.jd.com","create_time":"8/10/2023, 6:19:22 PM","update_time":"8/10/2023, 6:35:26 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.jd.com","inputParameters":[{"id":0,"name":"urlList_0","nodeId":1,"nodeName":"打开网页","value":"https://www.jd.com","desc":"要采集的网址列表,多行以\\n分开","type":"text","exampleValue":"https://www.jd.com"},{"id":1,"name":"loopText_1","nodeId":4,"nodeName":"循环","desc":"要输入的文本/网址,多行以\\n分开","type":"text","exampleValue":"1~2\n3~4","value":"1~2\n3~4"},{"id":2,"name":"inputText_2","nodeName":"输入文字","nodeId":12,"desc":"要输入的文本,如京东搜索框输入:电脑","type":"text","exampleValue":"Field[\"参数2_链接地址\"]+Field[\"自定义操作2\"]","value":"Field[\"参数2_链接地址\"]+Field[\"自定义操作2\"]"}],"outputParameters":[{"id":0,"name":"参数1_链接文本","desc":"","type":"text","recordASField":1,"exampleValue":"手机"},{"id":1,"name":"参数2_链接地址","desc":"","type":"text","recordASField":1,"exampleValue":"https://shouji.jd.com/"},{"id":2,"name":"自定义操作","desc":"自定义操作返回的数据","type":"text","recordASField":0,"exampleValue":""},{"id":3,"name":"自定义操作","desc":"自定义操作返回的数据","type":"text","recordASField":0,"exampleValue":""},{"id":4,"name":"自定义操作2","desc":"自定义操作返回的数据","type":"text","recordASField":0,"exampleValue":""}],"graph":[{"index":0,"id":0,"parentId":0,"type":-1,"option":0,"title":"root","sequence":[1,7,4,8,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.jd.com","links":"https://www.jd.com","maxWaitTime":10,"scrollType":0,"scrollCount":1,"scrollWaitTime":1,"cookies":""}},{"id":5,"index":2,"parentId":0,"type":1,"option":8,"title":"循环","sequence":[3,13,12],"isInLoop":false,"position":4,"parameters":{"history":4,"tabIndex":-1,"useLoop":false,"xpath":"/html/body/div[5]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]/div/a","iframe":false,"wait":0,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"scrollType":0,"scrollCount":1,"scrollWaitTime":1,"loopType":1,"pathList":"","textList":"","code":"","waitTime":0,"exitCount":0,"historyWait":2,"breakMode":0,"breakCode":"","breakCodeWaitTime":0,"allXPaths":["/html/body/div[5]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]/a[1]","//a[contains(., '手机')]","/html/body/div[last()-5]/div/div[last()-4]/div/div[last()-2]/div/div/div/div[last()-1]/div[last()-12]/a[last()-1]"]}},{"id":9,"index":3,"parentId":5,"type":0,"option":3,"title":"提取数据","sequence":[],"isInLoop":true,"position":0,"parameters":{"history":4,"tabIndex":-1,"useLoop":false,"xpath":"","iframe":false,"wait":0,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"clear":0,"paras":[{"nodeType":1,"contentType":0,"relative":true,"name":"参数1_链接文本","desc":"","extractType":0,"relativeXPath":"","allXPaths":"","exampleValues":[{"num":0,"value":"手机"}],"unique_index":"hxrjjymdhcll50bpgx","iframe":false,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":2,"contentType":0,"relative":true,"name":"参数2_链接地址","desc":"","relativeXPath":"","allXPaths":"","exampleValues":[{"num":0,"value":"https://shouji.jd.com/"}],"unique_index":"hxrjjymdhcll50bpgx","iframe":false,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0}],"loopType":1}},{"id":3,"index":4,"parentId":0,"type":1,"option":8,"title":"循环","sequence":[6,5,14],"isInLoop":false,"position":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,"scrollType":0,"scrollCount":1,"scrollWaitTime":1,"loopType":"3","pathList":"","textList":"1~2\n3~4","code":"","waitTime":0,"exitCount":0,"historyWait":2,"breakMode":0,"breakCode":"","breakCodeWaitTime":0}},{"id":7,"index":5,"parentId":3,"type":0,"option":4,"title":"输入文字","sequence":[],"isInLoop":true,"position":1,"parameters":{"history":3,"tabIndex":-1,"useLoop":true,"xpath":"//*[@id=\"key\"]","iframe":false,"wait":1,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"value":"","index":1,"allXPaths":["/html/body/div[4]/div[1]/div[2]/div[1]/input[1]","//input[contains(., '')]","id(\"key\")","//INPUT[@class='text defcolor']","/html/body/div[last()-6]/div/div[last()-2]/div/input"]}},{"id":6,"index":6,"parentId":3,"type":0,"option":4,"title":"输入文字","sequence":[],"isInLoop":true,"position":0,"parameters":{"history":1,"tabIndex":0,"useLoop":true,"xpath":"//*[@id=\"key\"]","iframe":false,"wait":1,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"value":"","index":2}},{"id":2,"index":7,"parentId":0,"type":0,"option":5,"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,"codeMode":"5","code":"self.a = 15","waitTime":0,"recordASField":0,"paraType":"text"}},{"id":4,"index":8,"parentId":0,"type":0,"option":5,"title":"自定义操作","sequence":[],"isInLoop":false,"position":3,"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,"codeMode":"5","code":"print(self.a, \"sdf---------------\")\nself.a += 222\nprint(self.a, \"sdf---------------\")","waitTime":0,"recordASField":0,"paraType":"text"}},{"id":-1,"index":9,"parentId":0,"type":2,"option":9,"title":"判断条件","sequence":[10,11],"isInLoop":false,"position":5,"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}},{"id":-1,"parentId":6,"index":10,"type":3,"option":10,"title":"条件分支","sequence":[],"isInLoop":false,"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,"class":0,"value":"","code":"","waitTime":0},"position":0},{"id":-1,"parentId":6,"index":11,"type":3,"option":10,"title":"条件分支","sequence":[],"isInLoop":false,"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,"class":0,"value":"","code":"","waitTime":0},"position":1},{"id":11,"index":12,"parentId":5,"type":0,"option":4,"title":"输入文字","sequence":[],"isInLoop":true,"position":2,"parameters":{"history":1,"tabIndex":0,"useLoop":false,"xpath":"//*[@id=\"key\"]","iframe":false,"wait":0,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"value":"Field[\"参数2_链接地址\"]+Field[\"自定义操作2\"]","index":0}},{"id":10,"index":13,"parentId":5,"type":0,"option":5,"title":"自定义操作2","sequence":[],"isInLoop":true,"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,"codeMode":"6","code":"str(self.a) + \"TEST\"","waitTime":0,"recordASField":0,"paraType":"text"}},{"id":8,"index":14,"parentId":3,"type":0,"option":4,"title":"输入文字","sequence":[],"isInLoop":true,"position":2,"parameters":{"history":1,"tabIndex":0,"useLoop":true,"xpath":"//*[@id=\"key\"]","iframe":false,"wait":1,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"value":"0","index":0}}]} \ No newline at end of file diff --git a/.temp_to_pub/EasySpider_Linux_x64/tasks/209.json b/.temp_to_pub/EasySpider_Linux_x64/tasks/209.json index 8d85f884..6531f860 100644 --- a/.temp_to_pub/EasySpider_Linux_x64/tasks/209.json +++ b/.temp_to_pub/EasySpider_Linux_x64/tasks/209.json @@ -1 +1 @@ -{"id":209,"name":"【软科排名】-中国最好学科排名|最权威的大学学科|高校学科排名","url":"https://www.shanghairanking.cn/rankings/bcsr/2023","links":"about:blank","create_time":"2023/11/22 21:51:29","update_time":"11/23/2023, 4:13:41 AM","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.shanghairanking.cn/rankings/bcsr/2023","inputParameters":[{"id":0,"name":"loopTimes_循环_0","nodeId":4,"nodeName":"循环","desc":"循环循环执行的次数(0代表无限循环)","type":"int","exampleValue":0,"value":0},{"id":1,"name":"loopText_1","nodeId":9,"nodeName":"循环","desc":"要输入的文本/网址,多行以\\n分开","type":"text","exampleValue":"https://www.shanghairanking.cn/rankings/bcsr/2023/0101\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0201\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0202\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0301\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0302\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0303\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0304\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0305\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0401\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0402\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0403\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0501\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0502\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0503\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0601\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0602\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0603\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0701\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0702\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0703\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0704\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0705\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0706\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0707\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0708\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0709\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0710\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0711\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0712\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0713\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0714\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0801\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0802\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0803\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0804\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0805\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0806\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0807\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0808\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0809\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0810\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0811\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0812\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0813\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0814\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0815\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0816\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0817\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0818\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0819\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0820\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0821\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0822\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0823\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0824\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0825\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0826\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0827\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0828\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0829\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0830\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0831\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0832\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0833\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0834\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0835\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0836\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0837\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0839\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0901\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0902\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0903\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0904\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0905\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0906\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0907\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0908\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0909\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/1001\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/1002\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/1003\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/1004\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/1005\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/1006\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/1007\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/1008\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/1009\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/1011\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/1201\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/1202\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/1203\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/1204\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/1205\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/1301\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/1302\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/1303\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/1304\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/1305\n","value":"https://www.shanghairanking.cn/rankings/bcsr/2023/0101\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0201\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0202\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0301\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0302\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0303\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0304\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0305\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0401\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0402\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0403\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0501\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0502\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0503\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0601\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0602\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0603\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0701\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0702\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0703\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0704\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0705\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0706\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0707\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0708\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0709\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0710\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0711\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0712\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0713\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0714\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0801\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0802\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0803\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0804\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0805\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0806\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0807\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0808\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0809\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0810\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0811\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0812\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0813\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0814\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0815\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0816\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0817\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0818\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0819\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0820\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0821\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0822\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0823\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0824\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0825\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0826\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0827\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0828\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0829\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0830\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0831\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0832\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0833\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0834\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0835\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0836\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0837\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0839\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0901\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0902\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0903\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0904\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0905\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0906\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0907\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0908\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0909\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/1001\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/1002\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/1003\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/1004\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/1005\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/1006\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/1007\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/1008\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/1009\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/1011\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/1201\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/1202\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/1203\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/1204\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/1205\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/1301\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/1302\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/1303\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/1304\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/1305\n"}],"outputParameters":[{"id":0,"name":"参数1_链接文本","desc":"","type":"text","recordASField":1,"exampleValue":"湖北大学\n "},{"id":1,"name":"参数3_文本","desc":"","type":"text","recordASField":1,"exampleValue":"(哲学)"}],"graph":[{"index":0,"id":0,"parentId":0,"type":-1,"option":0,"title":"root","sequence":[9],"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":1,"type":0,"option":1,"title":"打开网页","sequence":[],"isInLoop":true,"position":0,"parameters":{"useLoop":true,"xpath":"","wait":3,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"url":"https://www.shanghairanking.cn/rankings/bcsr/2023","links":"https://www.shanghairanking.cn/rankings/bcsr/2023","maxWaitTime":10,"scrollType":0,"scrollCount":1,"scrollWaitTime":1,"cookies":""}},{"id":-1,"index":2,"parentId":0,"type":1,"option":8,"title":"循环","sequence":[3],"isInLoop":false,"position":2,"parameters":{"history":4,"tabIndex":-1,"useLoop":false,"xpath":"/html/body/div[1]/div[1]/div[1]/div[2]/div[2]/div[1]/div/div[2]/div/a[1]/span[2]","iframe":false,"wait":0,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"scrollType":0,"scrollCount":1,"scrollWaitTime":1,"loopType":1,"pathList":"","textList":"","code":"","waitTime":0,"exitCount":0,"historyWait":2,"breakMode":0,"breakCode":"","breakCodeWaitTime":0,"allXPaths":""}},{"id":-1,"index":3,"parentId":3,"type":0,"option":2,"title":"点击元素","sequence":[],"isInLoop":true,"position":0,"parameters":{"history":4,"tabIndex":-1,"useLoop":true,"xpath":"","iframe":false,"wait":2,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"scrollType":0,"scrollCount":1,"scrollWaitTime":1,"clickWay":0,"maxWaitTime":10,"params":[],"allXPaths":"","loopType":1}},{"id":3,"index":4,"parentId":1,"type":1,"option":8,"title":"循环","sequence":[6,5],"isInLoop":true,"position":1,"parameters":{"history":5,"tabIndex":-1,"useLoop":false,"xpath":"//*[contains(@class, \"ant-pagination-next\")]/a[1]","iframe":false,"wait":0,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"scrollType":0,"scrollCount":1,"scrollWaitTime":1,"loopType":0,"pathList":"","textList":"","code":"","waitTime":0,"exitCount":0,"historyWait":2,"breakMode":0,"breakCode":"","breakCodeWaitTime":0,"allXPaths":["/html/body/div[1]/div[1]/div[1]/div[2]/div[1]/div[3]/div[2]/div[1]/div[1]/ul[1]/li[5]/a[1]","//a[contains(., '')]","//A[@class='ant-pagination-item-link']","/html/body/div[last()-3]/div/div/div[last()-2]/div/div/div/div[last()-1]/div/ul/li[last()-1]/a"]}},{"id":5,"index":5,"parentId":3,"type":0,"option":2,"title":"点击元素","sequence":[],"isInLoop":true,"position":1,"parameters":{"history":5,"tabIndex":-1,"useLoop":true,"xpath":"","iframe":false,"wait":2,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"scrollType":0,"scrollCount":1,"scrollWaitTime":1,"clickWay":0,"maxWaitTime":10,"params":[],"allXPaths":["/html/body/div[1]/div[1]/div[1]/div[2]/div[1]/div[3]/div[2]/div[1]/div[1]/ul[1]/li[5]/a[1]","//a[contains(., '')]","//A[@class='ant-pagination-item-link']","/html/body/div[last()-3]/div/div/div[last()-2]/div/div/div/div[last()-1]/div/ul/li[last()-1]/a"],"loopType":0}},{"id":4,"index":6,"parentId":3,"type":1,"option":8,"title":"循环","sequence":[8,7],"isInLoop":true,"position":0,"parameters":{"history":5,"tabIndex":-1,"useLoop":false,"xpath":"/html/body/div[1]/div[1]/div[1]/div[2]/div[1]/div[3]/div[2]/div[1]/div[1]/div[2]/table[1]/tbody[1]/tr/td[4]/div[1]/div[2]/div[1]/div[1]/div[1]/a[1]","iframe":false,"wait":0,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"scrollType":0,"scrollCount":1,"scrollWaitTime":1,"loopType":1,"pathList":"","textList":"","code":"","waitTime":0,"exitCount":0,"historyWait":2,"breakMode":0,"breakCode":"","breakCodeWaitTime":0,"allXPaths":["/html/body/div[1]/div[1]/div[1]/div[2]/div[1]/div[3]/div[2]/div[1]/div[1]/div[2]/table[1]/tbody[1]/tr[1]/td[4]/div[1]/div[2]/div[1]/div[1]/div[1]/a[1]","//a[contains(., '湖北大学')]","//A[@class='name-cn']","/html/body/div[last()-3]/div/div/div[last()-1]/div/div/div/div[last()-1]/div/div[last()-1]/table/tbody/tr[last()-29]/td[last()-1]/div/div/div[last()-1]/div/div/a"]}},{"id":7,"index":7,"parentId":4,"type":0,"option":3,"title":"提取数据","sequence":[],"isInLoop":true,"position":1,"parameters":{"history":5,"tabIndex":-1,"useLoop":false,"xpath":"","iframe":false,"wait":0,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"clear":0,"params":[{"nodeType":1,"contentType":0,"relative":true,"name":"参数1_链接文本","desc":"","extractType":0,"relativeXPath":"","allXPaths":"","exampleValues":[{"num":0,"value":"湖北大学\n "}],"unique_index":"dgby6tuc79nlp9toe7t","iframe":false,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0}],"loopType":1}},{"id":6,"index":8,"parentId":4,"type":0,"option":3,"title":"提取数据","sequence":[],"isInLoop":true,"position":0,"parameters":{"history":5,"tabIndex":-1,"useLoop":false,"xpath":"","iframe":false,"wait":0,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"clear":0,"params":[{"nodeType":0,"contentType":0,"relative":false,"name":"参数3_文本","desc":"","extractType":0,"relativeXPath":"/html/body/div[1]/div[1]/div[1]/div[2]/div[1]/div[3]/div[2]/div[1]/div[1]/div[1]/div[1]/div[3]","allXPaths":["/html/body/div[1]/div[1]/div[1]/div[2]/div[1]/div[3]/div[2]/div[1]/div[1]/div[1]/div[1]/div[3]","//div[contains(., '(哲学)')]","/html/body/div[last()-3]/div/div/div[last()-1]/div/div/div/div[last()-1]/div/div[last()-2]/div[last()-1]/div[last()-1]"],"exampleValues":[{"num":0,"value":"(哲学)"}],"unique_index":"xgoa18n26rllp9toqoa","iframe":false,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0}]}},{"id":1,"index":9,"parentId":0,"type":1,"option":8,"title":"循环","sequence":[10,4],"isInLoop":false,"position":0,"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,"scrollType":0,"scrollCount":1,"scrollWaitTime":1,"loopType":"4","pathList":"","textList":"https://www.shanghairanking.cn/rankings/bcsr/2023/0101\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0201\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0202\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0301\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0302\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0303\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0304\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0305\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0401\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0402\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0403\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0501\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0502\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0503\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0601\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0602\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0603\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0701\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0702\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0703\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0704\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0705\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0706\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0707\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0708\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0709\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0710\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0711\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0712\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0713\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0714\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0801\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0802\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0803\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0804\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0805\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0806\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0807\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0808\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0809\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0810\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0811\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0812\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0813\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0814\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0815\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0816\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0817\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0818\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0819\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0820\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0821\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0822\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0823\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0824\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0825\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0826\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0827\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0828\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0829\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0830\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0831\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0832\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0833\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0834\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0835\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0836\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0837\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0839\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0901\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0902\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0903\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0904\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0905\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0906\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0907\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0908\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/0909\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/1001\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/1002\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/1003\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/1004\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/1005\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/1006\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/1007\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/1008\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/1009\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/1011\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/1201\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/1202\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/1203\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/1204\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/1205\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/1301\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/1302\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/1303\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/1304\nhttps://www.shanghairanking.cn/rankings/bcsr/2023/1305\n","code":"","waitTime":0,"exitCount":0,"historyWait":2,"breakMode":0,"breakCode":"","breakCodeWaitTime":0}},{"id":2,"index":10,"parentId":1,"type":0,"option":1,"title":"打开网页","sequence":[],"isInLoop":true,"position":0,"parameters":{"history":1,"tabIndex":0,"useLoop":true,"xpath":"","iframe":false,"wait":0,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"url":"about:blank","links":"about:blank","maxWaitTime":10,"scrollType":0,"scrollCount":1,"scrollWaitTime":1,"cookies":""}}]} \ No newline at end of file +{"id":209,"name":"京东全球版-专业的综合网上购物商城","url":"https://www.jd.com","links":"https://www.jd.com","create_time":"12/12/2023, 12:20:51 PM","update_time":"12/12/2023, 12:20:51 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.jd.com","inputParameters":[{"id":0,"name":"urlList_0","nodeId":1,"nodeName":"打开网页","value":"https://www.jd.com","desc":"要采集的网址列表,多行以\\n分开","type":"text","exampleValue":"https://www.jd.com"}],"outputParameters":[{"id":0,"name":"参数1_链接文本","desc":"","type":"text","recordASField":1,"exampleValue":"领券中心"},{"id":1,"name":"参数2_链接地址","desc":"","type":"text","recordASField":1,"exampleValue":"https://a.jd.com/?channel=haiwai"}],"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.jd.com","links":"https://www.jd.com","maxWaitTime":10,"scrollType":0,"scrollCount":1,"scrollWaitTime":1,"cookies":""}},{"id":2,"index":2,"parentId":0,"type":1,"option":8,"title":"循环","sequence":[3],"isInLoop":false,"position":1,"parameters":{"history":4,"tabIndex":-1,"useLoop":false,"xpath":"/html/body/div[4]/div[1]/ul[1]/li/a[1]","iframe":false,"wait":0,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"scrollType":0,"scrollCount":1,"scrollWaitTime":1,"loopType":1,"pathList":"","textList":"","code":"","waitTime":0,"exitCount":0,"historyWait":2,"breakMode":0,"breakCode":"","breakCodeWaitTime":0,"allXPaths":["/html/body/div[4]/div[1]/ul[1]/li[1]/a[1]","//a[contains(., '领券中心')]","/html/body/div[last()-6]/div/ul/li[last()-1]/a"]}},{"id":3,"index":3,"parentId":2,"type":0,"option":3,"title":"提取数据","sequence":[],"isInLoop":true,"position":0,"parameters":{"history":4,"tabIndex":-1,"useLoop":false,"xpath":"","iframe":false,"wait":0,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"clear":0,"paras":[{"nodeType":1,"contentType":8,"relative":true,"name":"参数1_链接文本","desc":"","extractType":0,"relativeXPath":"","allXPaths":"","exampleValues":[{"num":0,"value":"领券中心"}],"unique_index":"jm1mx01sc2elq1u4av8","iframe":false,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":2,"contentType":0,"relative":true,"name":"参数2_链接地址","desc":"","relativeXPath":"","allXPaths":"","exampleValues":[{"num":0,"value":"https://a.jd.com/?channel=haiwai"}],"unique_index":"jm1mx01sc2elq1u4av8","iframe":false,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0}],"loopType":1}}]} \ No newline at end of file diff --git a/.temp_to_pub/EasySpider_Linux_x64/tasks/210.json b/.temp_to_pub/EasySpider_Linux_x64/tasks/210.json index 4fd145c3..cd715896 100644 --- a/.temp_to_pub/EasySpider_Linux_x64/tasks/210.json +++ b/.temp_to_pub/EasySpider_Linux_x64/tasks/210.json @@ -1 +1,337 @@ -{"id":210,"name":"360安全浏览器2023最新版下载-全面保护上网安全就选360安全浏览器-华军软件园","url":"https://www.onlinedown.net/soft/66801.htm","links":"https://www.onlinedown.net/soft/66801.htm","create_time":"10/10/2023, 10:39:02 PM","update_time":"10/10/2023, 10:39:02 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.onlinedown.net/soft/66801.htm","inputParameters":[{"id":0,"name":"urlList_0","nodeId":1,"nodeName":"打开网页","value":"https://www.onlinedown.net/soft/66801.htm","desc":"要采集的网址列表,多行以\\n分开","type":"text","exampleValue":"https://www.onlinedown.net/soft/66801.htm"}],"outputParameters":[],"graph":[{"index":0,"id":0,"parentId":0,"type":-1,"option":0,"title":"root","sequence":[1,2,3],"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.onlinedown.net/soft/66801.htm","links":"https://www.onlinedown.net/soft/66801.htm","maxWaitTime":10,"scrollType":0,"scrollCount":1,"scrollWaitTime":1,"cookies":""}},{"id":2,"index":2,"parentId":0,"type":0,"option":2,"title":"点击立即下载","sequence":[],"isInLoop":false,"position":1,"parameters":{"history":4,"tabIndex":-1,"useLoop":false,"xpath":"//*[contains(@class, \"lj-btn\")]","iframe":false,"wait":2,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"scrollType":0,"scrollCount":1,"scrollWaitTime":1,"clickWay":0,"maxWaitTime":10,"params":[],"allXPaths":["/html/body/section[1]/div[1]/div[1]/div[3]/div[2]/div[1]/div[1]/a[1]/b[1]","//b[contains(., '立即下载')]","//B[@class='lj-btn']","/html/body/section/div/div[last()-4]/div[last()-1]/div/div[last()-1]/div/a[last()-1]/b"]}},{"id":3,"index":3,"parentId":0,"type":0,"option":2,"title":"点击通用网络下载","sequence":[],"isInLoop":false,"position":2,"parameters":{"history":4,"tabIndex":-1,"useLoop":false,"xpath":"//*[contains(@class, \"down-list\")]/div[2]/p[1]/a[1]","iframe":false,"wait":2,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"scrollType":0,"scrollCount":1,"scrollWaitTime":1,"clickWay":0,"maxWaitTime":10,"params":[],"allXPaths":["/html/body/section[1]/div[1]/div[2]/div[1]/div[4]/div[1]/div[1]/div[2]/p[1]/a[1]","//a[contains(., '通用网络下载')]","//A[@class='qrcode_show rest']","/html/body/section/div/div[last()-3]/div[last()-1]/div[last()-4]/div/div[last()-1]/div[last()-1]/p/a[last()-1]"]}}]} \ No newline at end of file +{ + "id": 210, + "name": "【海鸥怎么样】海鸥口碑好不好_缺点_优点_点评_易车", + "url": "https://dianping.yiche.com/haiou/koubei/", + "links": "https://dianping.yiche.com/haiou/koubei/", + "create_time": "12/15/2023, 5:15:10 PM", + "update_time": "12/20/2023, 4:13:00 PM", + "version": "0.6.0", + "saveThreshold": 10, + "quitWaitTime": 60, + "environment": 0, + "maximizeWindow": 0, + "maxViewLength": 15, + "recordLog": 1, + "outputFormat": "xlsx", + "saveName": "current_time", + "dataWriteMode": 1, + "inputExcel": "", + "startFromExit": 0, + "pauseKey": "p", + "containJudge": false, + "browser": "chrome", + "removeDuplicate": 0, + "desc": "https://dianping.yiche.com/haiou/koubei/", + "inputParameters": [ + { + "id": 0, + "name": "urlList_0", + "nodeId": 1, + "nodeName": "打开网页", + "value": "https://dianping.yiche.com/haiou/koubei/", + "desc": "要采集的网址列表,多行以\\n分开", + "type": "text", + "exampleValue": "https://dianping.yiche.com/haiou/koubei/" + }, + { + "id": 1, + "name": "loopTimes_1", + "nodeId": 2, + "nodeName": "循环", + "desc": "循环循环执行的次数(0代表无限循环)", + "type": "int", + "exampleValue": 100, + "value": 100 + } + ], + "outputParameters": [ + { + "id": 0, + "name": "参数1", + "desc": "", + "type": "text", + "recordASField": 1, + "exampleValue": "\n \n \n \n \n \n \n 浑然一体水蜜桃1535\n \n \n \n 车主\n \n \n \n 2023-09-29\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n 海鸥 2023款 405km 飞翔版\n \n \n \n \n \n 4.43\n \n 裸车价\n 9.28万元\n \n \n \n \n 购车时间\n 2023-09\n \n \n \n \n \n \n \n \n 🕙购车经历\n销售答应了一堆配件,但是一个都没给我呢,我也不知道啥时候能给我,如果最后还是不给我,我打算曝光他们,太过分了,一个月了,都没轮到我。!!!\n一问就是没啦,当初是答应的好好的 。交了钱就装不上这些零件了。太过分了这些销售。大家要小心销售骗你哦。反正最后不给我我就去门口拉条幅去。车停他门口。警告其他消费者。\n💴提车价格\n92800 保险5300 上牌500\n⛽充电时间\n1小时吧,没有特别低的时候去充电\n🌍续航\n夏天的高温天气也让我对海鸥黑色的使用感到***。由于黑色的车身吸热较多,内部温度会比外部更高。因此,在炎炎夏日,我经常需要开启空调以\n 查看完整点评>>\n \n \n \n \n \n \n \n \n \n \n 共9 张\n \n \n \n \n \n " + } + ], + "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": 5, + "waitType": 0, + "beforeJS": "", + "beforeJSWaitTime": 0, + "afterJS": "", + "afterJSWaitTime": 0, + "waitElement": "", + "waitElementTime": 10, + "waitElementIframeIndex": 0, + "url": "https://dianping.yiche.com/haiou/koubei/", + "links": "https://dianping.yiche.com/haiou/koubei/", + "maxWaitTime": 10, + "scrollType": 0, + "scrollCount": 1, + "scrollWaitTime": 1, + "cookies": "" + } + }, + { + "id": 2, + "index": 2, + "parentId": 0, + "type": 1, + "option": 8, + "title": "循环", + "sequence": [4, 3], + "isInLoop": false, + "position": 1, + "parameters": { + "history": 4, + "tabIndex": -1, + "useLoop": false, + "xpath": "//*[contains(@class, \"next\")]", + "iframe": false, + "wait": 0, + "waitType": 0, + "beforeJS": "", + "beforeJSWaitTime": 0, + "afterJS": "", + "afterJSWaitTime": 0, + "waitElement": "", + "waitElementTime": 10, + "waitElementIframeIndex": 0, + "scrollType": 0, + "scrollCount": 1, + "scrollWaitTime": 1, + "loopType": 0, + "pathList": "", + "textList": "", + "code": "", + "waitTime": 0, + "exitCount": 100, + "historyWait": 2, + "breakMode": 0, + "breakCode": "", + "breakCodeWaitTime": 0, + "allXPaths": [ + "/html/body/div[6]/div[1]/div[5]/div[1]/a[2]", + "//a[contains(., '>')]", + "//A[@class='link-btn next pg-item']", + "/html/body/div[last()-5]/div[last()-3]/div[last()-1]/div/a" + ] + } + }, + { + "id": 4, + "index": 3, + "parentId": 2, + "type": 0, + "option": 2, + "title": "点击元素", + "sequence": [], + "isInLoop": true, + "position": 1, + "parameters": { + "history": 4, + "tabIndex": -1, + "useLoop": true, + "xpath": "", + "iframe": false, + "wait": 5, + "waitType": 0, + "beforeJS": "", + "beforeJSWaitTime": 0, + "afterJS": "", + "afterJSWaitTime": 0, + "waitElement": "", + "waitElementTime": 10, + "waitElementIframeIndex": 0, + "scrollType": 0, + "scrollCount": 1, + "scrollWaitTime": 1, + "clickWay": 0, + "maxWaitTime": 10, + "paras": [], + "allXPaths": [ + "/html/body/div[6]/div[1]/div[5]/div[1]/a[2]", + "//a[contains(., '>')]", + "//A[@class='link-btn next pg-item']", + "/html/body/div[last()-5]/div[last()-3]/div[last()-1]/div/a" + ], + "loopType": 0 + } + }, + { + "id": 3, + "index": 4, + "parentId": 2, + "type": 1, + "option": 8, + "title": "循环", + "sequence": [5], + "isInLoop": true, + "position": 0, + "parameters": { + "history": 5, + "tabIndex": -1, + "useLoop": false, + "xpath": "/html/body/div[6]/div[1]/div[4]/div", + "iframe": false, + "wait": 0, + "waitType": 0, + "beforeJS": "", + "beforeJSWaitTime": 0, + "afterJS": "", + "afterJSWaitTime": 0, + "waitElement": "", + "waitElementTime": 10, + "waitElementIframeIndex": 0, + "scrollType": 0, + "scrollCount": 1, + "scrollWaitTime": 1, + "loopType": 1, + "pathList": "", + "textList": "", + "code": "", + "waitTime": 0, + "exitCount": 0, + "historyWait": 2, + "breakMode": 0, + "breakCode": "", + "breakCodeWaitTime": 0, + "allXPaths": [ + "/html/body/div[6]/div[1]/div[4]/div[1]", + "//div[contains(., '')]", + "//DIV[@class='cm-content-moudle']", + "/html/body/div[last()-5]/div[last()-3]/div[last()-2]/div[last()-19]" + ] + } + }, + { + "id": 5, + "index": 5, + "parentId": 3, + "type": 0, + "option": 3, + "title": "提取数据", + "sequence": [], + "isInLoop": true, + "position": 0, + "parameters": { + "history": 5, + "tabIndex": -1, + "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": 0, + "relative": true, + "name": "参数1", + "desc": "", + "extractType": 0, + "relativeXPath": "", + "allXPaths": "", + "exampleValues": [ + { + "num": 0, + "value": "\n \n \n \n \n \n \n 浑然一体水蜜桃1535\n \n \n \n 车主\n \n \n \n 2023-09-29\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n 海鸥 2023款 405km 飞翔版\n \n \n \n \n \n 4.43\n \n 裸车价\n 9.28万元\n \n \n \n \n 购车时间\n 2023-09\n \n \n \n \n \n \n \n \n 🕙购车经历\n销售答应了一堆配件,但是一个都没给我呢,我也不知道啥时候能给我,如果最后还是不给我,我打算曝光他们,太过分了,一个月了,都没轮到我。!!!\n一问就是没啦,当初是答应的好好的 。交了钱就装不上这些零件了。太过分了这些销售。大家要小心销售骗你哦。反正最后不给我我就去门口拉条幅去。车停他门口。警告其他消费者。\n💴提车价格\n92800 保险5300 上牌500\n⛽充电时间\n1小时吧,没有特别低的时候去充电\n🌍续航\n夏天的高温天气也让我对海鸥黑色的使用感到***。由于黑色的车身吸热较多,内部温度会比外部更高。因此,在炎炎夏日,我经常需要开启空调以\n 查看完整点评>>\n \n \n \n \n \n \n \n \n \n \n 共9 张\n \n \n \n \n \n " + } + ], + "unique_index": "3z4vpp3jxm6lq6eyhad", + "iframe": false, + "default": "1", + "paraType": "text", + "recordASField": 1, + "beforeJS": "", + "beforeJSWaitTime": 0, + "JS": "", + "JSWaitTime": 0, + "afterJS": "", + "afterJSWaitTime": 0, + "downloadPic": 0 + } + ], + "loopType": 1, + "params": [ + { + "nodeType": 0, + "contentType": 0, + "relative": true, + "name": "参数1", + "desc": "", + "extractType": 0, + "relativeXPath": "", + "allXPaths": "", + "exampleValues": [ + { + "num": 0, + "value": "\n \n \n \n \n \n \n 浑然一体水蜜桃1535\n \n \n \n 车主\n \n \n \n 2023-09-29\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n 海鸥 2023款 405km 飞翔版\n \n \n \n \n \n 4.43\n \n 裸车价\n 9.28万元\n \n \n \n \n 购车时间\n 2023-09\n \n \n \n \n \n \n \n \n 🕙购车经历\n销售答应了一堆配件,但是一个都没给我呢,我也不知道啥时候能给我,如果最后还是不给我,我打算曝光他们,太过分了,一个月了,都没轮到我。!!!\n一问就是没啦,当初是答应的好好的 。交了钱就装不上这些零件了。太过分了这些销售。大家要小心销售骗你哦。反正最后不给我我就去门口拉条幅去。车停他门口。警告其他消费者。\n💴提车价格\n92800 保险5300 上牌500\n⛽充电时间\n1小时吧,没有特别低的时候去充电\n🌍续航\n夏天的高温天气也让我对海鸥黑色的使用感到***。由于黑色的车身吸热较多,内部温度会比外部更高。因此,在炎炎夏日,我经常需要开启空调以\n 查看完整点评>>\n \n \n \n \n \n \n \n \n \n \n 共9 张\n \n \n \n \n \n " + } + ], + "unique_index": "3z4vpp3jxm6lq6eyhad", + "iframe": false, + "default": "1", + "paraType": "text", + "recordASField": 1, + "beforeJS": "", + "beforeJSWaitTime": 0, + "JS": "", + "JSWaitTime": 0, + "afterJS": "", + "afterJSWaitTime": 0, + "downloadPic": 0 + } + ] + } + } + ] +} diff --git a/.temp_to_pub/EasySpider_Linux_x64/tasks/215.json b/.temp_to_pub/EasySpider_Linux_x64/tasks/215.json index e79cc2f1..46d3fce7 100644 --- a/.temp_to_pub/EasySpider_Linux_x64/tasks/215.json +++ b/.temp_to_pub/EasySpider_Linux_x64/tasks/215.json @@ -1 +1 @@ -{"id":215,"name":"弹窗示例","url":"https://easyspider.cn/test_pages/alert_test.html","links":"https://easyspider.cn/test_pages/alert_test.html","create_time":"12/5/2023, 1:53:45 AM","update_time":"12/6/2023, 9:33:12 PM","version":"0.6.0","saveThreshold":10,"environment":0,"maximizeWindow":0,"maxViewLength":15,"recordLog":1,"outputFormat":"xlsx","saveName":"current_time","inputExcel":"","startFromExit":0,"pauseKey":"p","containJudge":false,"desc":"https://easyspider.cn/test_pages/alert_test.html","inputParameters":[{"id":0,"name":"urlList_0","nodeId":1,"nodeName":"打开网页","value":"https://easyspider.cn/test_pages/alert_test.html","desc":"要采集的网址列表,多行以\\n分开","type":"text","exampleValue":"https://easyspider.cn/test_pages/alert_test.html"}],"outputParameters":[{"id":0,"name":"参数1_文本","desc":"","type":"text","recordASField":1,"exampleValue":"\n 弹窗示例\n \n \n function showAlert() {\n alert('你已经点击了按钮!');\n }\n \n\n\n\n#wrapperToolkitIframe{\n position: absolute;\n top:0;\n}\n.toolcannotdrag{\n background-color: navy;\n width: 100%;\n text-align: center;\n font-size: 13px;\n height: 26px !important;\n padding-top: 8px !important;\n color: white;\n}\n\n\n点击我\n\n\n ✖ ✍操作台(点此拖动,左上角调整大小) \n ● 已选中1个元素,您可以:\n 确认采集 取消选择 Path: //html \n"},{"id":1,"name":"自定义操作","desc":"自定义操作返回的数据","type":"text","recordASField":0,"exampleValue":""},{"id":2,"name":"自定义操作","desc":"自定义操作返回的数据","type":"text","recordASField":0,"exampleValue":""}],"graph":[{"index":0,"id":0,"parentId":0,"type":-1,"option":0,"title":"root","sequence":[1,4,3,5],"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://easyspider.cn/test_pages/alert_test.html","links":"https://easyspider.cn/test_pages/alert_test.html","maxWaitTime":10,"scrollType":0,"scrollCount":1,"scrollWaitTime":1,"cookies":""}},{"id":-1,"index":2,"parentId":0,"type":0,"option":2,"title":"点击点击我","sequence":[],"isInLoop":false,"position":3,"parameters":{"history":4,"tabIndex":-1,"useLoop":false,"xpath":"/html/body/button[1]","iframe":false,"wait":2,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"scrollType":0,"scrollCount":1,"scrollWaitTime":1,"clickWay":0,"maxWaitTime":10,"params":[],"alertHandleType":2,"allXPaths":["/html/body/button[1]","//button[contains(., '点击我')]","/html/body/button"]}},{"id":3,"index":3,"parentId":0,"type":0,"option":3,"title":"提取数据","sequence":[],"isInLoop":false,"position":2,"parameters":{"history":4,"tabIndex":-1,"useLoop":false,"xpath":"","iframe":false,"wait":0,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"clear":0,"newLine":1,"params":[{"nodeType":0,"contentType":0,"relative":false,"name":"参数1_文本","desc":"","extractType":0,"relativeXPath":"/html/body[1]/p[eval(\"self.a+1\")]","allXPaths":["//html[1]","//html[contains(., '弹窗示例')]","/html"],"exampleValues":[{"num":0,"value":"\n 弹窗示例\n \n \n function showAlert() {\n alert('你已经点击了按钮!');\n }\n \n\n\n\n#wrapperToolkitIframe{\n position: absolute;\n top:0;\n}\n.toolcannotdrag{\n background-color: navy;\n width: 100%;\n text-align: center;\n font-size: 13px;\n height: 26px !important;\n padding-top: 8px !important;\n color: white;\n}\n\n\n点击我\n\n\n ✖ ✍操作台(点此拖动,左上角调整大小) \n ● 已选中1个元素,您可以:\n 确认采集 取消选择 Path: //html \n"}],"unique_index":"d8of3rzoypelpr7n0qm","iframe":false,"default":"12345","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"alert(eval(\"self.a+2+int('1')\"))","afterJSWaitTime":0,"downloadPic":0}]}},{"id":2,"index":4,"parentId":0,"type":0,"option":5,"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,"newLine":1,"codeMode":"5","code":"self.a = 1\nself.b = \"45\"","waitTime":0,"recordASField":0,"paraType":"text"}},{"id":4,"index":5,"parentId":0,"type":0,"option":5,"title":"自定义操作","sequence":[],"isInLoop":false,"position":3,"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,"newLine":1,"codeMode":0,"code":"console.log(\"Field[\"参数1_文本\"]Field[\"参数1_文本\"]\")","waitTime":0,"recordASField":0,"paraType":"text"}}]} \ No newline at end of file +{"id":215,"name":"弹窗示例","url":"https://easyspider.cn/test_pages/alert_test.html","links":"https://easyspider.cn/test_pages/alert_test.html","create_time":"12/5/2023, 1:53:45 AM","update_time":"12/13/2023, 3:50:21 AM","version":"0.6.0","saveThreshold":10,"quitWaitTime":60,"environment":0,"maximizeWindow":0,"maxViewLength":15,"recordLog":1,"outputFormat":"xlsx","saveName":"current_time","inputExcel":"","startFromExit":0,"pauseKey":"p","containJudge":false,"desc":"https://easyspider.cn/test_pages/alert_test.html","inputParameters":[{"id":0,"name":"urlList_0","nodeId":1,"nodeName":"打开网页","value":"https://easyspider.cn/test_pages/alert_test.html","desc":"要采集的网址列表,多行以\\n分开","type":"text","exampleValue":"https://easyspider.cn/test_pages/alert_test.html"}],"outputParameters":[{"id":0,"name":"参数1_文本","desc":"","type":"text","recordASField":1,"exampleValue":"\n 弹窗示例\n \n \n function showAlert() {\n alert('你已经点击了按钮!');\n }\n \n\n\n\n#wrapperToolkitIframe{\n position: absolute;\n top:0;\n}\n.toolcannotdrag{\n background-color: navy;\n width: 100%;\n text-align: center;\n font-size: 13px;\n height: 26px !important;\n padding-top: 8px !important;\n color: white;\n}\n\n\n点击我\n\n\n ✖ ✍操作台(点此拖动,左上角调整大小) \n ● 已选中1个元素,您可以:\n 确认采集 取消选择 Path: //html \n"},{"id":1,"name":"自定义操作","desc":"自定义操作返回的数据","type":"text","recordASField":0,"exampleValue":""},{"id":2,"name":"自定义操作","desc":"自定义操作返回的数据","type":"text","recordASField":0,"exampleValue":""}],"graph":[{"index":0,"id":0,"parentId":0,"type":-1,"option":0,"title":"root","sequence":[1,4,3,5],"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://easyspider.cn/test_pages/alert_test.html","links":"https://easyspider.cn/test_pages/alert_test.html","maxWaitTime":10,"scrollType":0,"scrollCount":1,"scrollWaitTime":1,"cookies":""}},{"id":-1,"index":2,"parentId":0,"type":0,"option":2,"title":"点击点击我","sequence":[],"isInLoop":false,"position":3,"parameters":{"history":4,"tabIndex":-1,"useLoop":false,"xpath":"/html/body/button[1]","iframe":false,"wait":2,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"scrollType":0,"scrollCount":1,"scrollWaitTime":1,"clickWay":0,"maxWaitTime":10,"params":[],"alertHandleType":2,"allXPaths":["/html/body/button[1]","//button[contains(., '点击我')]","/html/body/button"]}},{"id":3,"index":3,"parentId":0,"type":0,"option":3,"title":"提取数据","sequence":[],"isInLoop":false,"position":2,"parameters":{"history":4,"tabIndex":-1,"useLoop":false,"xpath":"","iframe":false,"wait":0,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"clear":0,"newLine":1,"params":[{"nodeType":0,"contentType":0,"relative":false,"name":"参数1_文本","desc":"","extractType":0,"relativeXPath":"/html/body[1]/p[eval(\"self.a+1\")]","allXPaths":["//html[1]","//html[contains(., '弹窗示例')]","/html"],"exampleValues":[{"num":0,"value":"\n 弹窗示例\n \n \n function showAlert() {\n alert('你已经点击了按钮!');\n }\n \n\n\n\n#wrapperToolkitIframe{\n position: absolute;\n top:0;\n}\n.toolcannotdrag{\n background-color: navy;\n width: 100%;\n text-align: center;\n font-size: 13px;\n height: 26px !important;\n padding-top: 8px !important;\n color: white;\n}\n\n\n点击我\n\n\n ✖ ✍操作台(点此拖动,左上角调整大小) \n ● 已选中1个元素,您可以:\n 确认采集 取消选择 Path: //html \n"}],"unique_index":"d8of3rzoypelpr7n0qm","iframe":false,"default":"12345","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"alert(eval(\"self.a+2+int('1')\"))","afterJSWaitTime":0,"downloadPic":0}]}},{"id":2,"index":4,"parentId":0,"type":0,"option":5,"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,"newLine":1,"codeMode":"5","code":"self.a = 1\nself.b = \"45\"","waitTime":0,"recordASField":0,"paraType":"text"}},{"id":4,"index":5,"parentId":0,"type":0,"option":5,"title":"自定义操作","sequence":[],"isInLoop":false,"position":3,"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,"newLine":1,"codeMode":0,"code":"console.log(\"Field[\"参数1_文本\"]Field[\"参数1_文本\"]\")","waitTime":0,"recordASField":0,"paraType":"text"}}]} \ No newline at end of file diff --git a/.temp_to_pub/EasySpider_Linux_x64/tasks/221.json b/.temp_to_pub/EasySpider_Linux_x64/tasks/221.json index d0212ac6..3ff45cd6 100644 --- a/.temp_to_pub/EasySpider_Linux_x64/tasks/221.json +++ b/.temp_to_pub/EasySpider_Linux_x64/tasks/221.json @@ -1,889 +1 @@ -{ - "id": 221, - "name": "不固定元素列表测试:【软科排名】-中国最好学科排名|最权威的大学学科|高校学科排名", - "url": "https://www.shanghairanking.cn/rankings/bcsr/2023", - "links": "https://www.shanghairanking.cn/rankings/bcsr/2023", - "create_time": "12/5/2023, 4:12:11 AM", - "update_time": "12/10/2023, 5:56:54 AM", - "version": "0.6.0", - "saveThreshold": 10, - "quitWaitTime": 60, - "environment": 0, - "maximizeWindow": 0, - "maxViewLength": 15, - "recordLog": 1, - "outputFormat": "xlsx", - "saveName": "current_time", - "inputExcel": "", - "startFromExit": 0, - "pauseKey": "p", - "containJudge": false, - "desc": "https://www.shanghairanking.cn/rankings/bcsr/2023", - "inputParameters": [ - { - "id": 0, - "name": "urlList_0", - "nodeId": 1, - "nodeName": "打开网页", - "value": "https://www.shanghairanking.cn/rankings/bcsr/2023", - "desc": "要采集的网址列表,多行以\\n分开", - "type": "text", - "exampleValue": "https://www.shanghairanking.cn/rankings/bcsr/2023" - }, - { - "id": 1, - "name": "loopTimes_循环点击单个元素_1", - "nodeId": 6, - "nodeName": "循环点击单个元素", - "desc": "循环循环点击单个元素执行的次数(0代表无限循环)", - "type": "int", - "exampleValue": 0, - "value": 0 - } - ], - "outputParameters": [ - { - "id": 0, - "name": "参数1_文本", - "desc": "", - "type": "text", - "recordASField": 1, - "exampleValue": "1" - }, - { - "id": 1, - "name": "参数2_文本", - "desc": "", - "type": "text", - "recordASField": 1, - "exampleValue": "1" - }, - { - "id": 2, - "name": "参数3_文本", - "desc": "", - "type": "text", - "recordASField": 1, - "exampleValue": "前3%" - }, - { - "id": 3, - "name": "参数4_图片地址", - "desc": "", - "type": "text", - "recordASField": 1, - "exampleValue": "https://www.shanghairanking.cn/_uni/logo/28312850.png" - }, - { - "id": 4, - "name": "参数5_链接文本", - "desc": "", - "type": "text", - "recordASField": 1, - "exampleValue": "复旦大学\n " - }, - { - "id": 5, - "name": "参数6_链接地址", - "desc": "", - "type": "text", - "recordASField": 1, - "exampleValue": "/institution/fudan-university" - }, - { - "id": 6, - "name": "参数7_图片地址", - "desc": "", - "type": "text", - "recordASField": 1, - "exampleValue": "/_nuxt/img/uncollection.388fe56.svg" - }, - { - "id": 7, - "name": "参数8_链接文本", - "desc": "", - "type": "text", - "recordASField": 1, - "exampleValue": "\n " - }, - { - "id": 8, - "name": "参数9_链接地址", - "desc": "", - "type": "text", - "recordASField": 1, - "exampleValue": "/institution/fudan-university" - }, - { - "id": 9, - "name": "参数10_文本", - "desc": "", - "type": "text", - "recordASField": 1, - "exampleValue": "1044" - }, - { - "id": 10, - "name": "发送邮件123", - "desc": "自定义操作返回的数据", - "type": "text", - "recordASField": 0, - "exampleValue": "" - } - ], - "graph": [ - { - "index": 0, - "id": 0, - "parentId": 0, - "type": -1, - "option": 0, - "title": "root", - "sequence": [1, 8, 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.shanghairanking.cn/rankings/bcsr/2023", - "links": "https://www.shanghairanking.cn/rankings/bcsr/2023", - "maxWaitTime": 10, - "scrollType": 0, - "scrollCount": 1, - "scrollWaitTime": 1, - "cookies": "" - } - }, - { - "id": 3, - "index": 2, - "parentId": 0, - "type": 1, - "option": 8, - "title": "循环点击每个元素", - "sequence": [3, 6], - "isInLoop": false, - "position": 2, - "parameters": { - "history": 4, - "tabIndex": -1, - "useLoop": false, - "xpath": "/html/body/div[1]/div[1]/div[1]/div[2]/div[2]/div[1]/div/div[2]/div/a[1]/span[2]", - "iframe": false, - "wait": 0, - "waitType": 0, - "beforeJS": "", - "beforeJSWaitTime": 0, - "afterJS": "", - "afterJSWaitTime": 0, - "waitElement": "", - "waitElementTime": 10, - "waitElementIframeIndex": 0, - "scrollType": 0, - "scrollCount": 1, - "scrollWaitTime": 1, - "loopType": 1, - "pathList": "", - "textList": "", - "code": "", - "waitTime": 0, - "exitCount": 0, - "historyWait": 2, - "breakMode": 0, - "breakCode": "", - "breakCodeWaitTime": 0, - "allXPaths": "" - } - }, - { - "id": 4, - "index": 3, - "parentId": 3, - "type": 0, - "option": 2, - "title": "点击元素", - "sequence": [], - "isInLoop": true, - "position": 0, - "parameters": { - "history": 4, - "tabIndex": -1, - "useLoop": true, - "xpath": "", - "iframe": false, - "wait": 2, - "waitType": 0, - "beforeJS": "", - "beforeJSWaitTime": 0, - "afterJS": "", - "afterJSWaitTime": 0, - "waitElement": "", - "waitElementTime": 10, - "waitElementIframeIndex": 0, - "scrollType": 0, - "scrollCount": 1, - "scrollWaitTime": 1, - "clickWay": 0, - "maxWaitTime": 10, - "params": [], - "alertHandleType": 0, - "allXPaths": "", - "loopType": 1, - "codeMode": -1 - } - }, - { - "id": 6, - "index": 4, - "parentId": 5, - "type": 1, - "option": 8, - "title": "循环采集数据", - "sequence": [5], - "isInLoop": true, - "position": 0, - "parameters": { - "history": 5, - "tabIndex": -1, - "useLoop": false, - "xpath": "/html/body/div[1]/div[1]/div[1]/div[2]/div[1]/div[3]/div[2]/div[1]/div[1]/div[2]/table[1]/tbody[1]/tr", - "iframe": false, - "wait": 0, - "waitType": 0, - "beforeJS": "", - "beforeJSWaitTime": 0, - "afterJS": "", - "afterJSWaitTime": 0, - "waitElement": "", - "waitElementTime": 10, - "waitElementIframeIndex": 0, - "scrollType": 0, - "scrollCount": 1, - "scrollWaitTime": 1, - "loopType": 1, - "pathList": "", - "textList": "", - "code": "", - "waitTime": 0, - "exitCount": 0, - "historyWait": 2, - "breakMode": 0, - "breakCode": "", - "breakCodeWaitTime": 0, - "allXPaths": [ - "/html/body/div[1]/div[1]/div[1]/div[2]/div[1]/div[3]/div[2]/div[1]/div[1]/div[2]/table[1]/tbody[1]/tr[1]", - "//tr[contains(., '')]", - "/html/body/div[last()-3]/div/div/div[last()-1]/div/div/div/div[last()-1]/div/div[last()-1]/table/tbody/tr[last()-29]" - ] - } - }, - { - "id": 8, - "index": 5, - "parentId": 6, - "type": 0, - "option": 3, - "title": "提取数据", - "sequence": [], - "isInLoop": true, - "position": 0, - "parameters": { - "history": 5, - "tabIndex": -1, - "useLoop": false, - "xpath": "", - "iframe": false, - "wait": 0, - "waitType": 0, - "beforeJS": "", - "beforeJSWaitTime": 0, - "afterJS": "", - "afterJSWaitTime": 0, - "waitElement": "", - "waitElementTime": 10, - "waitElementIframeIndex": 0, - "clear": 0, - "newLine": 1, - "params": [ - { - "nodeType": 0, - "contentType": 1, - "relative": true, - "name": "参数1_文本", - "desc": "", - "relativeXPath": "/td[1]/div[1]", - "allXPaths": [ - "/td[1]/div[1]", - "//div[contains(., '')]", - "//DIV[@class='ranking']", - "/html/body/div[last()-3]/div/div/div[last()-1]/div/div/div/div[last()-1]/div/div[last()-1]/table/tbody/tr[last()-29]/td[last()-4]/div" - ], - "exampleValues": [{ "num": 0, "value": "1" }], - "unique_index": "/td[1]/div[1]", - "iframe": false, - "default": "", - "paraType": "text", - "recordASField": 1, - "beforeJS": "", - "beforeJSWaitTime": 0, - "JS": "", - "JSWaitTime": 0, - "afterJS": "", - "afterJSWaitTime": 0, - "downloadPic": 0 - }, - { - "nodeType": 0, - "contentType": 1, - "relative": true, - "name": "参数2_文本", - "desc": "", - "relativeXPath": "/td[2]/span[1]", - "allXPaths": [ - "/td[2]/span[1]", - "//span[contains(., '1')]", - "/html/body/div[last()-3]/div/div/div[last()-1]/div/div/div/div[last()-1]/div/div[last()-1]/table/tbody/tr[last()-29]/td[last()-3]/span" - ], - "exampleValues": [{ "num": 0, "value": "1" }], - "unique_index": "/td[2]/span[1]", - "iframe": false, - "default": "", - "paraType": "text", - "recordASField": 1, - "beforeJS": "", - "beforeJSWaitTime": 0, - "JS": "", - "JSWaitTime": 0, - "afterJS": "", - "afterJSWaitTime": 0, - "downloadPic": 0 - }, - { - "nodeType": 0, - "contentType": 1, - "relative": true, - "name": "参数3_文本", - "desc": "", - "relativeXPath": "/td[3]", - "allXPaths": [ - "/td[3]", - "//td[contains(., '')]", - "/html/body/div[last()-3]/div/div/div[last()-1]/div/div/div/div[last()-1]/div/div[last()-1]/table/tbody/tr[last()-29]/td[last()-2]" - ], - "exampleValues": [{ "num": 0, "value": "前3%" }], - "unique_index": "/td[3]", - "iframe": false, - "default": "", - "paraType": "text", - "recordASField": 1, - "beforeJS": "", - "beforeJSWaitTime": 0, - "JS": "", - "JSWaitTime": 0, - "afterJS": "", - "afterJSWaitTime": 0, - "downloadPic": 0 - }, - { - "nodeType": 4, - "contentType": 1, - "relative": true, - "name": "参数4_图片地址", - "desc": "", - "relativeXPath": "/td[4]/div[1]/div[1]/img[1]", - "allXPaths": [ - "/td[4]/div[1]/div[1]/img[1]", - "//img[contains(., '')]", - "//IMG[@class='univ-logo']", - "//IMG[@alt='复旦大学']", - "/html/body/div[last()-3]/div/div/div[last()-1]/div/div/div/div[last()-1]/div/div[last()-1]/table/tbody/tr[last()-29]/td[last()-1]/div/div[last()-1]/img" - ], - "exampleValues": [ - { - "num": 0, - "value": "https://www.shanghairanking.cn/_uni/logo/28312850.png" - } - ], - "unique_index": "/td[4]/div[1]/div[1]/img[1]", - "iframe": false, - "default": "", - "paraType": "text", - "recordASField": 1, - "beforeJS": "", - "beforeJSWaitTime": 0, - "JS": "", - "JSWaitTime": 0, - "afterJS": "", - "afterJSWaitTime": 0, - "downloadPic": 0 - }, - { - "nodeType": 1, - "contentType": 0, - "relative": true, - "name": "参数5_链接文本", - "desc": "", - "relativeXPath": "/td[4]/div[1]/div[2]/div[1]/div[1]/div[1]/a[1]", - "allXPaths": [ - "/td[4]/div[1]/div[2]/div[1]/div[1]/div[1]/a[1]", - "//a[contains(., '复旦大学')]", - "//A[@class='name-cn']", - "/html/body/div[last()-3]/div/div/div[last()-1]/div/div/div/div[last()-1]/div/div[last()-1]/table/tbody/tr[last()-29]/td[last()-1]/div/div/div[last()-1]/div/div/a" - ], - "exampleValues": [{ "num": 0, "value": "复旦大学\n " }], - "unique_index": "/td[4]/div[1]/div[2]/div[1]/div[1]/div[1]/a[1]", - "iframe": false, - "default": "", - "paraType": "text", - "recordASField": 1, - "beforeJS": "", - "beforeJSWaitTime": 0, - "JS": "", - "JSWaitTime": 0, - "afterJS": "", - "afterJSWaitTime": 0, - "downloadPic": 0 - }, - { - "nodeType": 2, - "contentType": 0, - "relative": true, - "name": "参数6_链接地址", - "desc": "", - "relativeXPath": "/td[4]/div[1]/div[2]/div[1]/div[1]/div[1]/a[1]", - "allXPaths": [ - "/td[4]/div[1]/div[2]/div[1]/div[1]/div[1]/a[1]", - "//a[contains(., '复旦大学')]", - "//A[@class='name-cn']", - "/html/body/div[last()-3]/div/div/div[last()-1]/div/div/div/div[last()-1]/div/div[last()-1]/table/tbody/tr[last()-29]/td[last()-1]/div/div/div[last()-1]/div/div/a" - ], - "exampleValues": [ - { "num": 0, "value": "/institution/fudan-university" } - ], - "unique_index": "/td[4]/div[1]/div[2]/div[1]/div[1]/div[1]/a[1]", - "iframe": false, - "default": "", - "paraType": "text", - "recordASField": 1, - "beforeJS": "", - "beforeJSWaitTime": 0, - "JS": "", - "JSWaitTime": 0, - "afterJS": "", - "afterJSWaitTime": 0, - "downloadPic": 0 - }, - { - "nodeType": 4, - "contentType": 1, - "relative": true, - "name": "参数7_图片地址", - "desc": "", - "relativeXPath": "/td[4]/div[1]/div[2]/div[1]/div[1]/div[1]/div[1]/img[1]", - "allXPaths": [ - "/td[4]/div[1]/div[2]/div[1]/div[1]/div[1]/div[1]/img[1]", - "//img[contains(., '')]", - "/html/body/div[last()-3]/div/div/div[last()-1]/div/div/div/div[last()-1]/div/div[last()-1]/table/tbody/tr[last()-29]/td[last()-1]/div/div/div[last()-1]/div/div/div/img" - ], - "exampleValues": [ - { "num": 0, "value": "/_nuxt/img/uncollection.388fe56.svg" } - ], - "unique_index": "/td[4]/div[1]/div[2]/div[1]/div[1]/div[1]/div[1]/img[1]", - "iframe": false, - "default": "", - "paraType": "text", - "recordASField": 1, - "beforeJS": "", - "beforeJSWaitTime": 0, - "JS": "", - "JSWaitTime": 0, - "afterJS": "", - "afterJSWaitTime": 0, - "downloadPic": 0 - }, - { - "nodeType": 1, - "contentType": 0, - "relative": true, - "name": "参数8_链接文本", - "desc": "", - "relativeXPath": "/td[4]/div[1]/div[2]/div[2]/div[1]/div[1]/a[1]", - "allXPaths": [ - "/td[4]/div[1]/div[2]/div[2]/div[1]/div[1]/a[1]", - "//a[contains(., '')]", - "//A[@class='name-en']", - "/html/body/div[last()-3]/div/div/div[last()-1]/div/div/div/div[last()-1]/div/div[last()-1]/table/tbody/tr[last()-29]/td[last()-1]/div/div/div/div/div/a" - ], - "exampleValues": [{ "num": 0, "value": "\n " }], - "unique_index": "/td[4]/div[1]/div[2]/div[2]/div[1]/div[1]/a[1]", - "iframe": false, - "default": "", - "paraType": "text", - "recordASField": 1, - "beforeJS": "", - "beforeJSWaitTime": 0, - "JS": "", - "JSWaitTime": 0, - "afterJS": "", - "afterJSWaitTime": 0, - "downloadPic": 0 - }, - { - "nodeType": 2, - "contentType": 0, - "relative": true, - "name": "参数9_链接地址", - "desc": "", - "relativeXPath": "/td[4]/div[1]/div[2]/div[2]/div[1]/div[1]/a[1]", - "allXPaths": [ - "/td[4]/div[1]/div[2]/div[2]/div[1]/div[1]/a[1]", - "//a[contains(., '')]", - "//A[@class='name-en']", - "/html/body/div[last()-3]/div/div/div[last()-1]/div/div/div/div[last()-1]/div/div[last()-1]/table/tbody/tr[last()-29]/td[last()-1]/div/div/div/div/div/a" - ], - "exampleValues": [ - { "num": 0, "value": "/institution/fudan-university" } - ], - "unique_index": "/td[4]/div[1]/div[2]/div[2]/div[1]/div[1]/a[1]", - "iframe": false, - "default": "", - "paraType": "text", - "recordASField": 1, - "beforeJS": "", - "beforeJSWaitTime": 0, - "JS": "", - "JSWaitTime": 0, - "afterJS": "", - "afterJSWaitTime": 0, - "downloadPic": 0 - }, - { - "nodeType": 0, - "contentType": 1, - "relative": true, - "name": "参数10_文本", - "desc": "", - "relativeXPath": "/td[5]", - "allXPaths": [ - "/td[5]", - "//td[contains(., '')]", - "/html/body/div[last()-3]/div/div/div[last()-1]/div/div/div/div[last()-1]/div/div[last()-1]/table/tbody/tr[last()-29]/td" - ], - "exampleValues": [{ "num": 0, "value": "1044" }], - "unique_index": "/td[5]", - "iframe": false, - "default": "", - "paraType": "text", - "recordASField": 1, - "beforeJS": "", - "beforeJSWaitTime": 0, - "JS": "", - "JSWaitTime": 0, - "afterJS": "", - "afterJSWaitTime": 0, - "downloadPic": 0 - } - ] - } - }, - { - "id": 5, - "index": 6, - "parentId": 3, - "type": 1, - "option": 8, - "title": "循环点击单个元素", - "sequence": [4, 7], - "isInLoop": true, - "position": 1, - "parameters": { - "history": 5, - "tabIndex": -1, - "useLoop": false, - "xpath": "//*[contains(@class, \"ant-pagination-next\")]/a[1]", - "iframe": false, - "wait": 0, - "waitType": 0, - "beforeJS": "", - "beforeJSWaitTime": 0, - "afterJS": "", - "afterJSWaitTime": 0, - "waitElement": "", - "waitElementTime": 10, - "waitElementIframeIndex": 0, - "scrollType": 0, - "scrollCount": 1, - "scrollWaitTime": 1, - "loopType": 0, - "pathList": "", - "textList": "", - "code": "", - "waitTime": 0, - "exitCount": 0, - "historyWait": 2, - "breakMode": 0, - "breakCode": "", - "breakCodeWaitTime": 0, - "allXPaths": [ - "/html/body/div[1]/div[1]/div[1]/div[2]/div[1]/div[3]/div[2]/div[1]/div[1]/ul[1]/li[5]/a[1]", - "//a[contains(., '')]", - "//A[@class='ant-pagination-item-link']", - "/html/body/div[last()-3]/div/div/div[last()-2]/div/div/div/div[last()-1]/div/ul/li[last()-1]/a" - ], - "codeMode": -1 - } - }, - { - "id": 7, - "index": 7, - "parentId": 5, - "type": 0, - "option": 2, - "title": "点击元素", - "sequence": [], - "isInLoop": true, - "position": 1, - "parameters": { - "history": 5, - "tabIndex": -1, - "useLoop": true, - "xpath": "", - "iframe": false, - "wait": 2, - "waitType": 0, - "beforeJS": "", - "beforeJSWaitTime": 0, - "afterJS": "", - "afterJSWaitTime": 0, - "waitElement": "", - "waitElementTime": 10, - "waitElementIframeIndex": 0, - "scrollType": 0, - "scrollCount": 1, - "scrollWaitTime": 1, - "clickWay": 0, - "maxWaitTime": 10, - "params": [], - "alertHandleType": 0, - "allXPaths": [ - "/html/body/div[1]/div[1]/div[1]/div[2]/div[1]/div[3]/div[2]/div[1]/div[1]/ul[1]/li[5]/a[1]", - "//a[contains(., '')]", - "//A[@class='ant-pagination-item-link']", - "/html/body/div[last()-3]/div/div/div[last()-2]/div/div/div/div[last()-1]/div/ul/li[last()-1]/a" - ], - "loopType": 0 - } - }, - { - "id": 2, - "index": 8, - "parentId": 0, - "type": 0, - "option": 5, - "title": "发送邮件123", - "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, - "newLine": 1, - "codeMode": "9", - "code": "", - "waitTime": 0, - "recordASField": 0, - "paraType": "text", - "emailConfig": { - "host": "smtp.163.co23m", - "port": "465", - "username": "test@163.com", - "password": "asdf", - "from": "", - "to": "test@163.com", - "subject": "123", - "content": "434" - } - } - }, - { - "id": -1, - "index": 9, - "parentId": 0, - "type": 0, - "option": 5, - "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, - "newLine": 1, - "codeMode": "7", - "code": "", - "waitTime": 0, - "recordASField": 0, - "paraType": "text", - "emailConfig": { - "host": "", - "port": 465, - "username": "", - "password": "", - "from": "", - "to": "", - "subject": "", - "content": "" - } - } - }, - { - "id": -1, - "index": 10, - "parentId": 0, - "type": 0, - "option": 5, - "title": "执行JavaScript", - "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, - "newLine": 1, - "codeMode": "0", - "code": "", - "waitTime": 0, - "recordASField": 0, - "paraType": "text", - "emailConfig": { - "host": "", - "port": 465, - "username": "", - "password": "", - "from": "", - "to": "", - "subject": "", - "content": "" - } - } - }, - { - "id": -1, - "index": 11, - "parentId": 0, - "type": 0, - "option": 5, - "title": "暂停程序dfgs", - "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, - "newLine": 1, - "codeMode": "7", - "code": "", - "waitTime": 0, - "recordASField": 0, - "paraType": "text", - "emailConfig": { - "host": "", - "port": 465, - "username": "", - "password": "", - "from": "", - "to": "", - "subject": "", - "content": "" - } - } - } - ] -} +{"id":221,"name":"不固定元素列表测试:【软科排名】-中国最好学科排名|最权威的大学学科|高校学科排名","url":"https://www.shanghairanking.cn/rankings/bcsr/2023","links":"https://www.shanghairanking.cn/rankings/bcsr/2023","create_time":"12/5/2023, 4:12:11 AM","update_time":"12/13/2023, 3:06:51 AM","version":"0.6.0","saveThreshold":10,"quitWaitTime":60,"environment":0,"maximizeWindow":0,"maxViewLength":15,"recordLog":1,"outputFormat":"xlsx","saveName":"current_time","inputExcel":"","startFromExit":0,"pauseKey":"p","containJudge":false,"desc":"https://www.shanghairanking.cn/rankings/bcsr/2023","inputParameters":[{"id":0,"name":"urlList_0","nodeId":1,"nodeName":"打开网页","value":"https://www.shanghairanking.cn/rankings/bcsr/2023","desc":"要采集的网址列表,多行以\\n分开","type":"text","exampleValue":"https://www.shanghairanking.cn/rankings/bcsr/2023"},{"id":1,"name":"loopTimes_循环点击单个元素_1","nodeId":6,"nodeName":"循环点击单个元素","desc":"循环循环点击单个元素执行的次数(0代表无限循环)","type":"int","exampleValue":0,"value":0}],"outputParameters":[{"id":0,"name":"参数1_文本","desc":"","type":"text","recordASField":1,"exampleValue":"1"},{"id":1,"name":"参数2_文本","desc":"","type":"text","recordASField":1,"exampleValue":"1"},{"id":2,"name":"参数3_文本","desc":"","type":"text","recordASField":1,"exampleValue":"前3%"},{"id":3,"name":"参数4_图片地址","desc":"","type":"text","recordASField":1,"exampleValue":"https://www.shanghairanking.cn/_uni/logo/28312850.png"},{"id":4,"name":"参数5_链接文本","desc":"","type":"text","recordASField":1,"exampleValue":"复旦大学\n "},{"id":5,"name":"参数6_链接地址","desc":"","type":"text","recordASField":1,"exampleValue":"/institution/fudan-university"},{"id":6,"name":"参数7_图片地址","desc":"","type":"text","recordASField":1,"exampleValue":"/_nuxt/img/uncollection.388fe56.svg"},{"id":7,"name":"参数8_链接文本","desc":"","type":"text","recordASField":1,"exampleValue":"\n "},{"id":8,"name":"参数9_链接地址","desc":"","type":"text","recordASField":1,"exampleValue":"/institution/fudan-university"},{"id":9,"name":"参数10_文本","desc":"","type":"text","recordASField":1,"exampleValue":"1044"},{"id":10,"name":"自定义参数_1","desc":"","type":"text","recordASField":1,"exampleValue":"自定义值"},{"id":11,"name":"发送邮件123","desc":"自定义操作返回的数据","type":"text","recordASField":0,"exampleValue":""}],"graph":[{"index":0,"id":0,"parentId":0,"type":-1,"option":0,"title":"root","sequence":[1,8,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.shanghairanking.cn/rankings/bcsr/2023","links":"https://www.shanghairanking.cn/rankings/bcsr/2023","maxWaitTime":10,"scrollType":0,"scrollCount":1,"scrollWaitTime":1,"cookies":""}},{"id":3,"index":2,"parentId":0,"type":1,"option":8,"title":"循环点击每个元素","sequence":[3,6],"isInLoop":false,"position":2,"parameters":{"history":4,"tabIndex":-1,"useLoop":false,"xpath":"/html/body/div[1]/div[1]/div[1]/div[2]/div[2]/div[1]/div/div[2]/div/a[1]/span[2]","iframe":false,"wait":0,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"scrollType":0,"scrollCount":1,"scrollWaitTime":1,"loopType":1,"pathList":"","textList":"","code":"","waitTime":0,"exitCount":0,"historyWait":2,"breakMode":0,"breakCode":"","breakCodeWaitTime":0,"allXPaths":""}},{"id":4,"index":3,"parentId":3,"type":0,"option":2,"title":"点击元素","sequence":[],"isInLoop":true,"position":0,"parameters":{"history":4,"tabIndex":-1,"useLoop":true,"xpath":"","iframe":false,"wait":2,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"scrollType":0,"scrollCount":1,"scrollWaitTime":1,"clickWay":0,"maxWaitTime":10,"params":[],"alertHandleType":0,"allXPaths":"","loopType":1,"codeMode":-1,"newTab":1}},{"id":6,"index":4,"parentId":5,"type":1,"option":8,"title":"循环采集数据","sequence":[5],"isInLoop":true,"position":0,"parameters":{"history":5,"tabIndex":-1,"useLoop":false,"xpath":"/html/body/div[1]/div[1]/div[1]/div[2]/div[1]/div[3]/div[2]/div[1]/div[1]/div[2]/table[1]/tbody[1]/tr","iframe":false,"wait":0,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"scrollType":0,"scrollCount":1,"scrollWaitTime":1,"loopType":1,"pathList":"","textList":"","code":"","waitTime":0,"exitCount":0,"historyWait":2,"breakMode":0,"breakCode":"","breakCodeWaitTime":0,"allXPaths":["/html/body/div[1]/div[1]/div[1]/div[2]/div[1]/div[3]/div[2]/div[1]/div[1]/div[2]/table[1]/tbody[1]/tr[1]","//tr[contains(., '')]","/html/body/div[last()-3]/div/div/div[last()-1]/div/div/div/div[last()-1]/div/div[last()-1]/table/tbody/tr[last()-29]"]}},{"id":8,"index":5,"parentId":6,"type":0,"option":3,"title":"提取数据","sequence":[],"isInLoop":true,"position":0,"parameters":{"history":5,"tabIndex":-1,"useLoop":false,"xpath":"","iframe":false,"wait":0,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"clear":0,"newLine":1,"params":[{"nodeType":0,"contentType":1,"relative":true,"name":"参数1_文本","desc":"","relativeXPath":"/td[1]/div[1]","allXPaths":["/td[1]/div[1]","//div[contains(., '')]","//DIV[@class='ranking']","/html/body/div[last()-3]/div/div/div[last()-1]/div/div/div/div[last()-1]/div/div[last()-1]/table/tbody/tr[last()-29]/td[last()-4]/div"],"exampleValues":[{"num":0,"value":"1"}],"unique_index":"/td[1]/div[1]","iframe":false,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数2_文本","desc":"","relativeXPath":"/td[2]/span[1]","allXPaths":["/td[2]/span[1]","//span[contains(., '1')]","/html/body/div[last()-3]/div/div/div[last()-1]/div/div/div/div[last()-1]/div/div[last()-1]/table/tbody/tr[last()-29]/td[last()-3]/span"],"exampleValues":[{"num":0,"value":"1"}],"unique_index":"/td[2]/span[1]","iframe":false,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数3_文本","desc":"","relativeXPath":"/td[3]","allXPaths":["/td[3]","//td[contains(., '')]","/html/body/div[last()-3]/div/div/div[last()-1]/div/div/div/div[last()-1]/div/div[last()-1]/table/tbody/tr[last()-29]/td[last()-2]"],"exampleValues":[{"num":0,"value":"前3%"}],"unique_index":"/td[3]","iframe":false,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":4,"contentType":1,"relative":true,"name":"参数4_图片地址","desc":"","relativeXPath":"/td[4]/div[1]/div[1]/img[1]","allXPaths":["/td[4]/div[1]/div[1]/img[1]","//img[contains(., '')]","//IMG[@class='univ-logo']","//IMG[@alt='复旦大学']","/html/body/div[last()-3]/div/div/div[last()-1]/div/div/div/div[last()-1]/div/div[last()-1]/table/tbody/tr[last()-29]/td[last()-1]/div/div[last()-1]/img"],"exampleValues":[{"num":0,"value":"https://www.shanghairanking.cn/_uni/logo/28312850.png"}],"unique_index":"/td[4]/div[1]/div[1]/img[1]","iframe":false,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":1,"contentType":0,"relative":true,"name":"参数5_链接文本","desc":"","relativeXPath":"/td[4]/div[1]/div[2]/div[1]/div[1]/div[1]/a[1]","allXPaths":["/td[4]/div[1]/div[2]/div[1]/div[1]/div[1]/a[1]","//a[contains(., '复旦大学')]","//A[@class='name-cn']","/html/body/div[last()-3]/div/div/div[last()-1]/div/div/div/div[last()-1]/div/div[last()-1]/table/tbody/tr[last()-29]/td[last()-1]/div/div/div[last()-1]/div/div/a"],"exampleValues":[{"num":0,"value":"复旦大学\n "}],"unique_index":"/td[4]/div[1]/div[2]/div[1]/div[1]/div[1]/a[1]","iframe":false,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":2,"contentType":0,"relative":true,"name":"参数6_链接地址","desc":"","relativeXPath":"/td[4]/div[1]/div[2]/div[1]/div[1]/div[1]/a[1]","allXPaths":["/td[4]/div[1]/div[2]/div[1]/div[1]/div[1]/a[1]","//a[contains(., '复旦大学')]","//A[@class='name-cn']","/html/body/div[last()-3]/div/div/div[last()-1]/div/div/div/div[last()-1]/div/div[last()-1]/table/tbody/tr[last()-29]/td[last()-1]/div/div/div[last()-1]/div/div/a"],"exampleValues":[{"num":0,"value":"/institution/fudan-university"}],"unique_index":"/td[4]/div[1]/div[2]/div[1]/div[1]/div[1]/a[1]","iframe":false,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":4,"contentType":1,"relative":true,"name":"参数7_图片地址","desc":"","relativeXPath":"/td[4]/div[1]/div[2]/div[1]/div[1]/div[1]/div[1]/img[1]","allXPaths":["/td[4]/div[1]/div[2]/div[1]/div[1]/div[1]/div[1]/img[1]","//img[contains(., '')]","/html/body/div[last()-3]/div/div/div[last()-1]/div/div/div/div[last()-1]/div/div[last()-1]/table/tbody/tr[last()-29]/td[last()-1]/div/div/div[last()-1]/div/div/div/img"],"exampleValues":[{"num":0,"value":"/_nuxt/img/uncollection.388fe56.svg"}],"unique_index":"/td[4]/div[1]/div[2]/div[1]/div[1]/div[1]/div[1]/img[1]","iframe":false,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":1,"contentType":0,"relative":true,"name":"参数8_链接文本","desc":"","relativeXPath":"/td[4]/div[1]/div[2]/div[2]/div[1]/div[1]/a[1]","allXPaths":["/td[4]/div[1]/div[2]/div[2]/div[1]/div[1]/a[1]","//a[contains(., '')]","//A[@class='name-en']","/html/body/div[last()-3]/div/div/div[last()-1]/div/div/div/div[last()-1]/div/div[last()-1]/table/tbody/tr[last()-29]/td[last()-1]/div/div/div/div/div/a"],"exampleValues":[{"num":0,"value":"\n "}],"unique_index":"/td[4]/div[1]/div[2]/div[2]/div[1]/div[1]/a[1]","iframe":false,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":2,"contentType":0,"relative":true,"name":"参数9_链接地址","desc":"","relativeXPath":"/td[4]/div[1]/div[2]/div[2]/div[1]/div[1]/a[1]","allXPaths":["/td[4]/div[1]/div[2]/div[2]/div[1]/div[1]/a[1]","//a[contains(., '')]","//A[@class='name-en']","/html/body/div[last()-3]/div/div/div[last()-1]/div/div/div/div[last()-1]/div/div[last()-1]/table/tbody/tr[last()-29]/td[last()-1]/div/div/div/div/div/a"],"exampleValues":[{"num":0,"value":"/institution/fudan-university"}],"unique_index":"/td[4]/div[1]/div[2]/div[2]/div[1]/div[1]/a[1]","iframe":false,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数10_文本","desc":"","relativeXPath":"/td[5]","allXPaths":["/td[5]","//td[contains(., '')]","/html/body/div[last()-3]/div/div/div[last()-1]/div/div/div/div[last()-1]/div/div[last()-1]/table/tbody/tr[last()-29]/td"],"exampleValues":[{"num":0,"value":"1044"}],"unique_index":"/td[5]","iframe":false,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":0,"relative":false,"name":"自定义参数_1","desc":"","iframe":false,"extractType":0,"relativeXPath":"//body","recordASField":1,"allXPaths":[],"exampleValues":[{"num":0,"value":"自定义值"}],"default":"","beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0,"paraType":"text"}]}},{"id":5,"index":6,"parentId":3,"type":1,"option":8,"title":"循环点击单个元素","sequence":[4,7],"isInLoop":true,"position":1,"parameters":{"history":5,"tabIndex":-1,"useLoop":false,"xpath":"//*[contains(@class, \"ant-pagination-next\")]/a[1]","iframe":false,"wait":0,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"scrollType":0,"scrollCount":1,"scrollWaitTime":1,"loopType":0,"pathList":"","textList":"","code":"","waitTime":0,"exitCount":0,"historyWait":2,"breakMode":0,"breakCode":"","breakCodeWaitTime":0,"allXPaths":["/html/body/div[1]/div[1]/div[1]/div[2]/div[1]/div[3]/div[2]/div[1]/div[1]/ul[1]/li[5]/a[1]","//a[contains(., '')]","//A[@class='ant-pagination-item-link']","/html/body/div[last()-3]/div/div/div[last()-2]/div/div/div/div[last()-1]/div/ul/li[last()-1]/a"],"codeMode":-1}},{"id":7,"index":7,"parentId":5,"type":0,"option":2,"title":"点击元素","sequence":[],"isInLoop":true,"position":1,"parameters":{"history":5,"tabIndex":-1,"useLoop":true,"xpath":"","iframe":false,"wait":2,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"scrollType":0,"scrollCount":1,"scrollWaitTime":1,"clickWay":0,"maxWaitTime":10,"params":[],"alertHandleType":0,"allXPaths":["/html/body/div[1]/div[1]/div[1]/div[2]/div[1]/div[3]/div[2]/div[1]/div[1]/ul[1]/li[5]/a[1]","//a[contains(., '')]","//A[@class='ant-pagination-item-link']","/html/body/div[last()-3]/div/div/div[last()-2]/div/div/div/div[last()-1]/div/ul/li[last()-1]/a"],"loopType":0}},{"id":2,"index":8,"parentId":0,"type":0,"option":5,"title":"发送邮件123","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,"newLine":1,"codeMode":"9","code":"","waitTime":0,"recordASField":0,"paraType":"text","emailConfig":{"host":"smtp.163.co23m","port":"465","username":"test@163.com","password":"asdf","from":"","to":"test@163.com","subject":"123","content":"434"}}},{"id":-1,"index":9,"parentId":0,"type":0,"option":5,"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,"newLine":1,"codeMode":"7","code":"","waitTime":0,"recordASField":0,"paraType":"text","emailConfig":{"host":"","port":465,"username":"","password":"","from":"","to":"","subject":"","content":""}}},{"id":-1,"index":10,"parentId":0,"type":0,"option":5,"title":"执行JavaScript","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,"newLine":1,"codeMode":"0","code":"","waitTime":0,"recordASField":0,"paraType":"text","emailConfig":{"host":"","port":465,"username":"","password":"","from":"","to":"","subject":"","content":""}}},{"id":-1,"index":11,"parentId":0,"type":0,"option":5,"title":"暂停程序dfgs","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,"newLine":1,"codeMode":"7","code":"","waitTime":0,"recordASField":0,"paraType":"text","emailConfig":{"host":"","port":465,"username":"","password":"","from":"","to":"","subject":"","content":""}}}]} \ No newline at end of file diff --git a/.temp_to_pub/EasySpider_Linux_x64/tasks/237.json b/.temp_to_pub/EasySpider_Linux_x64/tasks/237.json index 025e0915..3e90d13b 100644 --- a/.temp_to_pub/EasySpider_Linux_x64/tasks/237.json +++ b/.temp_to_pub/EasySpider_Linux_x64/tasks/237.json @@ -1 +1 @@ -{"id":237,"name":"EXEC自定义函数示例:中国地震台网——历史查询","url":"https://www.ceic.ac.cn/history","links":"https://www.ceic.ac.cn/history","create_time":"12/9/2023, 3:36:47 AM","update_time":"12/11/2023, 4:27:41 AM","version":"0.6.0","saveThreshold":10,"quitWaitTime":60,"environment":0,"maximizeWindow":0,"maxViewLength":15,"recordLog":1,"outputFormat":"xlsx","saveName":"current_time","inputExcel":"","startFromExit":0,"pauseKey":"k","containJudge":false,"desc":"https://www.ceic.ac.cn/history","inputParameters":[{"id":0,"name":"urlList_0","nodeId":1,"nodeName":"打开网页","value":"https://www.ceic.ac.cn/history","desc":"要采集的网址列表,多行以\\n分开","type":"text","exampleValue":"https://www.ceic.ac.cn/history"},{"id":1,"name":"loopText_1","nodeId":2,"nodeName":"循环","desc":"要输入的文本/网址,多行以\\n分开","type":"text","exampleValue":"15\n25\n35","value":"15\n25\n35"},{"id":2,"name":"loopTimes_循环点击单个元素_2","nodeId":5,"nodeName":"循环点击单个元素","desc":"循环循环点击单个元素执行的次数(0代表无限循环)","type":"int","exampleValue":0,"value":0}],"outputParameters":[{"id":0,"name":"参数1_文本","desc":"","type":"text","recordASField":1,"exampleValue":"3.7"},{"id":1,"name":"参数2_文本","desc":"","type":"text","recordASField":1,"exampleValue":"2023-11-3003:44:10"},{"id":2,"name":"参数3_文本","desc":"","type":"text","recordASField":1,"exampleValue":"37.53"},{"id":3,"name":"参数4_文本","desc":"","type":"text","recordASField":1,"exampleValue":"112.47"},{"id":4,"name":"参数5_文本","desc":"","type":"text","recordASField":1,"exampleValue":"28"},{"id":5,"name":"参数6_链接文本","desc":"","type":"text","recordASField":1,"exampleValue":"山西太原市清徐县"},{"id":6,"name":"参数7_链接地址","desc":"","type":"text","recordASField":1,"exampleValue":"https://news.ceic.ac.cn/CC20231130034410.html"},{"id":7,"name":"参数8_文本","desc":"","type":"text","recordASField":1,"exampleValue":"震级(M)"},{"id":8,"name":"参数9_文本","desc":"","type":"text","recordASField":1,"exampleValue":"发震时刻(UTC+8)"},{"id":9,"name":"参数10_文本","desc":"","type":"text","recordASField":1,"exampleValue":"纬度(°)"},{"id":10,"name":"参数11_文本","desc":"","type":"text","recordASField":1,"exampleValue":"经度(°)"},{"id":11,"name":"参数12_文本","desc":"","type":"text","recordASField":1,"exampleValue":"深度(千米)"},{"id":12,"name":"参数13_文本","desc":"","type":"text","recordASField":1,"exampleValue":"参考位置"},{"id":13,"name":"自定义操作","desc":"自定义操作返回的数据","type":"text","recordASField":0,"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.ceic.ac.cn/history","links":"https://www.ceic.ac.cn/history","maxWaitTime":10,"scrollType":0,"scrollCount":1,"scrollWaitTime":1,"cookies":""}},{"id":2,"index":2,"parentId":0,"type":1,"option":8,"title":"循环","sequence":[3,4,9,5],"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,"scrollType":0,"scrollCount":1,"scrollWaitTime":1,"loopType":"3","pathList":"","textList":"15\n25\n35","code":"","waitTime":0,"exitCount":0,"historyWait":2,"breakMode":0,"breakCode":"","breakCodeWaitTime":0}},{"id":3,"index":3,"parentId":2,"type":0,"option":4,"title":"输入文字","sequence":[],"isInLoop":true,"position":0,"parameters":{"history":4,"tabIndex":-1,"useLoop":true,"xpath":"//*[@id=\"weidu1\"]","iframe":false,"wait":0,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"value":"1","index":0,"allXPaths":["/html/body/div[1]/div[3]/div[1]/div[1]/div[1]/form[1]/div[2]/input[1]","//input[contains(., '')]","id(\"weidu1\")","//INPUT[@class='span1']","//INPUT[@name='weidu1']","/html/body/div[last()-3]/div[last()-1]/div/div/div[last()-1]/form/div[last()-3]/input[last()-1]"]}},{"id":4,"index":4,"parentId":2,"type":0,"option":2,"title":"点击查询","sequence":[],"isInLoop":true,"position":1,"parameters":{"history":4,"tabIndex":-1,"useLoop":false,"xpath":"//*[@id=\"search\"]","iframe":false,"wait":2,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"scrollType":0,"scrollCount":1,"scrollWaitTime":1,"clickWay":0,"maxWaitTime":10,"params":[],"alertHandleType":0,"allXPaths":["/html/body/div[1]/div[3]/div[1]/div[1]/div[1]/form[1]/div[5]/a[1]","//a[contains(., '查询')]","id(\"search\")","//A[@class='check']","/html/body/div[last()-3]/div[last()-1]/div/div/div[last()-1]/form/div/a"]}},{"id":6,"index":5,"parentId":2,"type":1,"option":8,"title":"循环点击单个元素","sequence":[7,6],"isInLoop":true,"position":3,"parameters":{"history":4,"tabIndex":-1,"useLoop":false,"xpath":"//*[contains(@class, \"pagination\")]/ul[1]/li[last()-1]/a[1]","iframe":false,"wait":0,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"scrollType":0,"scrollCount":1,"scrollWaitTime":1,"loopType":0,"pathList":"","textList":"","code":"","waitTime":0,"exitCount":0,"historyWait":2,"breakMode":0,"breakCode":"","breakCodeWaitTime":0,"allXPaths":["/html/body/div[1]/div[3]/div[1]/div[1]/div[2]/div[1]/div[2]/div[1]/div[1]/ul[1]/li[10]/a[1]","//a[contains(., '»')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div/div/div/ul/li[last()-1]/a"]}},{"id":8,"index":6,"parentId":6,"type":0,"option":2,"title":"点击»","sequence":[],"isInLoop":true,"position":1,"parameters":{"history":4,"tabIndex":-1,"useLoop":true,"xpath":"","iframe":false,"wait":2,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"scrollType":0,"scrollCount":1,"scrollWaitTime":1,"clickWay":0,"maxWaitTime":10,"params":[],"alertHandleType":0,"allXPaths":["/html/body/div[1]/div[3]/div[1]/div[1]/div[2]/div[1]/div[2]/div[1]/div[1]/ul[1]/li[10]/a[1]","//a[contains(., '»')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div/div/div/ul/li[last()-1]/a"],"loopType":0}},{"id":7,"index":7,"parentId":6,"type":1,"option":8,"title":"循环采集数据","sequence":[8],"isInLoop":true,"position":0,"parameters":{"history":4,"tabIndex":-1,"useLoop":false,"xpath":"/html/body/div[1]/div[3]/div[1]/div[1]/div[2]/div[1]/div[1]/table[1]/tbody[1]/tr","iframe":false,"wait":0,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"scrollType":0,"scrollCount":1,"scrollWaitTime":1,"loopType":1,"pathList":"","textList":"","code":"","waitTime":0,"exitCount":0,"historyWait":2,"breakMode":0,"breakCode":"","breakCodeWaitTime":0,"allXPaths":["/html/body/div[1]/div[3]/div[1]/div[1]/div[2]/div[1]/div[1]/table[1]/tbody[1]/tr[1]","//tr[contains(., '震级(M)发震时刻(')]","//TR[@class='speed-tr-h1']","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-20]"]}},{"id":9,"index":8,"parentId":7,"type":0,"option":3,"title":"提取数据","sequence":[],"isInLoop":true,"position":0,"parameters":{"history":4,"tabIndex":-1,"useLoop":false,"xpath":"","iframe":false,"wait":0,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"clear":0,"newLine":1,"params":[{"nodeType":0,"contentType":1,"relative":true,"name":"参数1_文本","desc":"","relativeXPath":"/td[eval(\"self.test()\")]","allXPaths":["/td[1]","//td[contains(., '3.7')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-19]/td[last()-5]"],"exampleValues":[{"num":0,"value":"3.7"}],"unique_index":"/td[1]","iframe":false,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数2_文本","desc":"","relativeXPath":"/td[2]","allXPaths":["/td[2]","//td[contains(., '2023-11-30')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-19]/td[last()-4]"],"exampleValues":[{"num":0,"value":"2023-11-3003:44:10"}],"unique_index":"/td[2]","iframe":false,"default":"","paraType":"text","recordASField":1,"beforeJS":"arguments[0].innerText = \"123\"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数3_文本","desc":"","relativeXPath":"/td[3]","allXPaths":["/td[3]","//td[contains(., '37.53')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-19]/td[last()-3]"],"exampleValues":[{"num":0,"value":"37.53"}],"unique_index":"/td[3]","iframe":false,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数4_文本","desc":"","relativeXPath":"/td[4]","allXPaths":["/td[4]","//td[contains(., '112.47')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-19]/td[last()-2]"],"exampleValues":[{"num":0,"value":"112.47"}],"unique_index":"/td[4]","iframe":false,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数5_文本","desc":"","relativeXPath":"/td[5]","allXPaths":["/td[5]","//td[contains(., '28')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-19]/td[last()-1]"],"exampleValues":[{"num":0,"value":"28"}],"unique_index":"/td[5]","iframe":false,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":1,"contentType":0,"relative":true,"name":"参数6_链接文本","desc":"","relativeXPath":"/td[6]/a[1]","allXPaths":["/td[6]/a[1]","//a[contains(., '山西太原市清徐县')]","id(\"cid\")","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-19]/td/a"],"exampleValues":[{"num":0,"value":"山西太原市清徐县"}],"unique_index":"/td[6]/a[1]","iframe":false,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":2,"contentType":0,"relative":true,"name":"参数7_链接地址","desc":"","relativeXPath":"/td[6]/a[1]","allXPaths":["/td[6]/a[1]","//a[contains(., '山西太原市清徐县')]","id(\"cid\")","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-19]/td/a"],"exampleValues":[{"num":0,"value":"https://news.ceic.ac.cn/CC20231130034410.html"}],"unique_index":"/td[6]/a[1]","iframe":false,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数8_文本","desc":"","relativeXPath":"/th[1]","allXPaths":["/th[1]","//th[contains(., '震级(M)')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-20]/th[last()-5]"],"exampleValues":[{"num":1,"value":"震级(M)"}],"unique_index":"/th[1]","iframe":false,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数9_文本","desc":"","relativeXPath":"/th[2]","allXPaths":["/th[2]","//th[contains(., '发震时刻(UTC+8')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-20]/th[last()-4]"],"exampleValues":[{"num":1,"value":"发震时刻(UTC+8)"}],"unique_index":"/th[2]","iframe":false,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数10_文本","desc":"","relativeXPath":"/th[3]","allXPaths":["/th[3]","//th[contains(., '纬度(°)')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-20]/th[last()-3]"],"exampleValues":[{"num":1,"value":"纬度(°)"}],"unique_index":"/th[3]","iframe":false,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数11_文本","desc":"","relativeXPath":"/th[4]","allXPaths":["/th[4]","//th[contains(., '经度(°)')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-20]/th[last()-2]"],"exampleValues":[{"num":1,"value":"经度(°)"}],"unique_index":"/th[4]","iframe":false,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数12_文本","desc":"","relativeXPath":"/th[5]","allXPaths":["/th[5]","//th[contains(., '深度(千米)')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-20]/th[last()-1]"],"exampleValues":[{"num":1,"value":"深度(千米)"}],"unique_index":"/th[5]","iframe":false,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数13_文本","desc":"","relativeXPath":"/th[6]","allXPaths":["/th[6]","//th[contains(., '参考位置')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-20]/th"],"exampleValues":[{"num":1,"value":"参考位置"}],"unique_index":"/th[6]","iframe":false,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0}],"loopType":1}},{"id":5,"index":9,"parentId":2,"type":0,"option":5,"title":"自定义操作","sequence":[],"isInLoop":true,"position":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,"clear":0,"newLine":1,"codeMode":"5","code":"def test():\n a = 1\n print(\"AMESSAGE:\",a)\n return a\nself.test =test","waitTime":0,"recordASField":0,"paraType":"text"}}]} \ No newline at end of file +{"id":237,"name":"EXEC自定义函数示例:中国地震台网——历史查询","url":"https://www.ceic.ac.cn/history","links":"https://www.ceic.ac.cn/history","create_time":"12/9/2023, 3:36:47 AM","update_time":"12/12/2023, 7:12:50 AM","version":"0.6.0","saveThreshold":10,"quitWaitTime":60,"environment":0,"maximizeWindow":0,"maxViewLength":15,"recordLog":1,"outputFormat":"xlsx","saveName":"current_time","inputExcel":"","startFromExit":0,"pauseKey":"k","containJudge":true,"desc":"https://www.ceic.ac.cn/history","inputParameters":[{"id":0,"name":"urlList_0","nodeId":1,"nodeName":"打开网页","value":"https://www.ceic.ac.cn/history","desc":"要采集的网址列表,多行以\\n分开","type":"text","exampleValue":"https://www.ceic.ac.cn/history"},{"id":1,"name":"loopText_1","nodeId":2,"nodeName":"循环","desc":"要输入的文本/网址,多行以\\n分开","type":"text","exampleValue":"15\n25\n35","value":"15\n25\n35"},{"id":2,"name":"loopTimes_循环点击单个元素_2","nodeId":5,"nodeName":"循环点击单个元素","desc":"循环循环点击单个元素执行的次数(0代表无限循环)","type":"int","exampleValue":0,"value":0}],"outputParameters":[{"id":0,"name":"参数1_文本","desc":"","type":"text","recordASField":1,"exampleValue":"3.7"},{"id":1,"name":"参数2_文本","desc":"","type":"text","recordASField":1,"exampleValue":"2023-11-3003:44:10"},{"id":2,"name":"参数3_文本","desc":"","type":"text","recordASField":1,"exampleValue":"37.53"},{"id":3,"name":"参数4_文本","desc":"","type":"text","recordASField":1,"exampleValue":"112.47"},{"id":4,"name":"参数5_文本","desc":"","type":"text","recordASField":1,"exampleValue":"28"},{"id":5,"name":"参数6_链接文本","desc":"","type":"text","recordASField":1,"exampleValue":"山西太原市清徐县"},{"id":6,"name":"参数7_链接地址","desc":"","type":"text","recordASField":1,"exampleValue":"https://news.ceic.ac.cn/CC20231130034410.html"},{"id":7,"name":"参数8_文本","desc":"","type":"text","recordASField":1,"exampleValue":"震级(M)"},{"id":8,"name":"参数9_文本","desc":"","type":"text","recordASField":1,"exampleValue":"发震时刻(UTC+8)"},{"id":9,"name":"参数10_文本","desc":"","type":"text","recordASField":1,"exampleValue":"纬度(°)"},{"id":10,"name":"参数11_文本","desc":"","type":"text","recordASField":1,"exampleValue":"经度(°)"},{"id":11,"name":"参数12_文本","desc":"","type":"text","recordASField":1,"exampleValue":"深度(千米)"},{"id":12,"name":"参数13_文本","desc":"","type":"text","recordASField":1,"exampleValue":"参考位置"},{"id":13,"name":"自定义操作","desc":"自定义操作返回的数据","type":"text","recordASField":0,"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.ceic.ac.cn/history","links":"https://www.ceic.ac.cn/history","maxWaitTime":10,"scrollType":0,"scrollCount":1,"scrollWaitTime":1,"cookies":""}},{"id":2,"index":2,"parentId":0,"type":1,"option":8,"title":"循环","sequence":[3,4,9,5],"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,"scrollType":0,"scrollCount":1,"scrollWaitTime":1,"loopType":"3","pathList":"","textList":"15\n25\n35","code":"","waitTime":0,"exitCount":0,"historyWait":2,"breakMode":0,"breakCode":"","breakCodeWaitTime":0}},{"id":3,"index":3,"parentId":2,"type":0,"option":4,"title":"输入文字","sequence":[],"isInLoop":true,"position":0,"parameters":{"history":4,"tabIndex":-1,"useLoop":true,"xpath":"//*[@id=\"weidu1\"]","iframe":false,"wait":0,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"value":"1","index":0,"allXPaths":["/html/body/div[1]/div[3]/div[1]/div[1]/div[1]/form[1]/div[2]/input[1]","//input[contains(., '')]","id(\"weidu1\")","//INPUT[@class='span1']","//INPUT[@name='weidu1']","/html/body/div[last()-3]/div[last()-1]/div/div/div[last()-1]/form/div[last()-3]/input[last()-1]"]}},{"id":4,"index":4,"parentId":2,"type":0,"option":2,"title":"点击查询","sequence":[],"isInLoop":true,"position":1,"parameters":{"history":4,"tabIndex":-1,"useLoop":false,"xpath":"//*[@id=\"search\"]","iframe":false,"wait":2,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"scrollType":0,"scrollCount":1,"scrollWaitTime":1,"clickWay":0,"maxWaitTime":10,"params":[],"alertHandleType":0,"allXPaths":["/html/body/div[1]/div[3]/div[1]/div[1]/div[1]/form[1]/div[5]/a[1]","//a[contains(., '查询')]","id(\"search\")","//A[@class='check']","/html/body/div[last()-3]/div[last()-1]/div/div/div[last()-1]/form/div/a"]}},{"id":6,"index":5,"parentId":2,"type":1,"option":8,"title":"循环点击单个元素","sequence":[7,6],"isInLoop":true,"position":3,"parameters":{"history":4,"tabIndex":-1,"useLoop":false,"xpath":"//*[contains(@class, \"pagination\")]/ul[1]/li[last()-1]/a[1]","iframe":false,"wait":0,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"scrollType":0,"scrollCount":1,"scrollWaitTime":1,"loopType":0,"pathList":"","textList":"","code":"","waitTime":0,"exitCount":0,"historyWait":2,"breakMode":0,"breakCode":"","breakCodeWaitTime":0,"allXPaths":["/html/body/div[1]/div[3]/div[1]/div[1]/div[2]/div[1]/div[2]/div[1]/div[1]/ul[1]/li[10]/a[1]","//a[contains(., '»')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div/div/div/ul/li[last()-1]/a"]}},{"id":8,"index":6,"parentId":6,"type":0,"option":2,"title":"点击»","sequence":[],"isInLoop":true,"position":1,"parameters":{"history":4,"tabIndex":-1,"useLoop":true,"xpath":"","iframe":false,"wait":2,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"scrollType":0,"scrollCount":1,"scrollWaitTime":1,"clickWay":0,"maxWaitTime":10,"params":[],"alertHandleType":0,"allXPaths":["/html/body/div[1]/div[3]/div[1]/div[1]/div[2]/div[1]/div[2]/div[1]/div[1]/ul[1]/li[10]/a[1]","//a[contains(., '»')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div/div/div/ul/li[last()-1]/a"],"loopType":0}},{"id":7,"index":7,"parentId":6,"type":1,"option":8,"title":"循环采集数据","sequence":[10],"isInLoop":true,"position":0,"parameters":{"history":4,"tabIndex":-1,"useLoop":false,"xpath":"/html/body/div[1]/div[3]/div[1]/div[1]/div[2]/div[1]/div[1]/table[1]/tbody[1]/tr","iframe":false,"wait":0,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"scrollType":0,"scrollCount":1,"scrollWaitTime":1,"loopType":1,"pathList":"","textList":"","code":"","waitTime":0,"exitCount":0,"historyWait":2,"breakMode":0,"breakCode":"","breakCodeWaitTime":0,"allXPaths":["/html/body/div[1]/div[3]/div[1]/div[1]/div[2]/div[1]/div[1]/table[1]/tbody[1]/tr[1]","//tr[contains(., '震级(M)发震时刻(')]","//TR[@class='speed-tr-h1']","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-20]"]}},{"id":12,"index":8,"parentId":10,"type":0,"option":3,"title":"提取数据","sequence":[],"isInLoop":true,"position":0,"parameters":{"history":4,"tabIndex":-1,"useLoop":false,"xpath":"","iframe":false,"wait":0,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"clear":0,"newLine":1,"params":[{"nodeType":0,"contentType":1,"relative":true,"name":"参数1_文本","desc":"","relativeXPath":"/td[eval(\"self.test()\")]","allXPaths":["/td[1]","//td[contains(., '3.7')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-19]/td[last()-5]"],"exampleValues":[{"num":0,"value":"3.7"}],"unique_index":"/td[1]","iframe":false,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数2_文本","desc":"","relativeXPath":"/td[2]","allXPaths":["/td[2]","//td[contains(., '2023-11-30')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-19]/td[last()-4]"],"exampleValues":[{"num":0,"value":"2023-11-3003:44:10"}],"unique_index":"/td[2]","iframe":false,"default":"","paraType":"text","recordASField":1,"beforeJS":"arguments[0].innerText = \"123\"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数3_文本","desc":"","relativeXPath":"/td[3]","allXPaths":["/td[3]","//td[contains(., '37.53')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-19]/td[last()-3]"],"exampleValues":[{"num":0,"value":"37.53"}],"unique_index":"/td[3]","iframe":false,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数4_文本","desc":"","relativeXPath":"/td[4]","allXPaths":["/td[4]","//td[contains(., '112.47')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-19]/td[last()-2]"],"exampleValues":[{"num":0,"value":"112.47"}],"unique_index":"/td[4]","iframe":false,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数5_文本","desc":"","relativeXPath":"/td[5]","allXPaths":["/td[5]","//td[contains(., '28')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-19]/td[last()-1]"],"exampleValues":[{"num":0,"value":"28"}],"unique_index":"/td[5]","iframe":false,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":1,"contentType":0,"relative":true,"name":"参数6_链接文本","desc":"","relativeXPath":"/td[6]/a[1]","allXPaths":["/td[6]/a[1]","//a[contains(., '山西太原市清徐县')]","id(\"cid\")","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-19]/td/a"],"exampleValues":[{"num":0,"value":"山西太原市清徐县"}],"unique_index":"/td[6]/a[1]","iframe":false,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":2,"contentType":0,"relative":true,"name":"参数7_链接地址","desc":"","relativeXPath":"/td[6]/a[1]","allXPaths":["/td[6]/a[1]","//a[contains(., '山西太原市清徐县')]","id(\"cid\")","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-19]/td/a"],"exampleValues":[{"num":0,"value":"https://news.ceic.ac.cn/CC20231130034410.html"}],"unique_index":"/td[6]/a[1]","iframe":false,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数8_文本","desc":"","relativeXPath":"/th[1]","allXPaths":["/th[1]","//th[contains(., '震级(M)')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-20]/th[last()-5]"],"exampleValues":[{"num":1,"value":"震级(M)"}],"unique_index":"/th[1]","iframe":false,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数9_文本","desc":"","relativeXPath":"/th[2]","allXPaths":["/th[2]","//th[contains(., '发震时刻(UTC+8')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-20]/th[last()-4]"],"exampleValues":[{"num":1,"value":"发震时刻(UTC+8)"}],"unique_index":"/th[2]","iframe":false,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数10_文本","desc":"","relativeXPath":"/th[3]","allXPaths":["/th[3]","//th[contains(., '纬度(°)')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-20]/th[last()-3]"],"exampleValues":[{"num":1,"value":"纬度(°)"}],"unique_index":"/th[3]","iframe":false,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数11_文本","desc":"","relativeXPath":"/th[4]","allXPaths":["/th[4]","//th[contains(., '经度(°)')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-20]/th[last()-2]"],"exampleValues":[{"num":1,"value":"经度(°)"}],"unique_index":"/th[4]","iframe":false,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数12_文本","desc":"","relativeXPath":"/th[5]","allXPaths":["/th[5]","//th[contains(., '深度(千米)')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-20]/th[last()-1]"],"exampleValues":[{"num":1,"value":"深度(千米)"}],"unique_index":"/th[5]","iframe":false,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数13_文本","desc":"","relativeXPath":"/th[6]","allXPaths":["/th[6]","//th[contains(., '参考位置')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-20]/th"],"exampleValues":[{"num":1,"value":"参考位置"}],"unique_index":"/th[6]","iframe":false,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0}],"loopType":1}},{"id":5,"index":9,"parentId":2,"type":0,"option":5,"title":"自定义操作","sequence":[],"isInLoop":true,"position":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,"clear":0,"newLine":1,"codeMode":"5","code":"def test():\n a = 1\n print(\"AMESSAGE:\",a)\n return a\nself.test =test","waitTime":0,"recordASField":0,"paraType":"text"}},{"id":9,"index":10,"parentId":7,"type":2,"option":9,"title":"判断条件","sequence":[11,12],"isInLoop":true,"position":0,"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}},{"id":10,"parentId":9,"index":11,"type":3,"option":10,"title":"条件分支1","sequence":[8],"isInLoop":true,"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,"class":1,"value":"39.78","code":"","waitTime":0},"position":0},{"id":11,"parentId":9,"index":12,"type":3,"option":10,"title":"条件分支2","sequence":[],"isInLoop":true,"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,"class":0,"value":"","code":"","waitTime":0},"position":1}]} \ No newline at end of file diff --git a/.temp_to_pub/EasySpider_Linux_x64/tasks/95.json b/.temp_to_pub/EasySpider_Linux_x64/tasks/95.json index 2d6f0849..927cec62 100644 --- a/.temp_to_pub/EasySpider_Linux_x64/tasks/95.json +++ b/.temp_to_pub/EasySpider_Linux_x64/tasks/95.json @@ -1 +1 @@ -{"id":95,"name":"详情页+图片","url":"https://www.dongchedi.com/article/7238974191096152615","links":"https://www.dongchedi.com/article/7238974191096152615\n","create_time":"5/31/2023, 11:28:40 PM","version":"0.3.2","containJudge":false,"desc":"https://www.dongchedi.com/article/7238974191096152615","inputParameters":[{"id":0,"name":"urlList_0","nodeId":1,"nodeName":"打开网页","value":"https://www.dongchedi.com/article/7238974191096152615\n","desc":"要采集的网址列表,多行以\\n分开","type":"string","exampleValue":"https://www.dongchedi.com/article/7238974191096152615\n"}],"outputParameters":[{"id":0,"name":"参数1_图片页面标题","desc":"","type":"string","exampleValue":"腾势N7将上市,两种前脸,外观很年轻运动,续航702km_懂车帝"},{"id":1,"name":"参数1_文本","desc":"","type":"string","exampleValue":"在此前的上海车展上,腾势N7(图片)已经正式开始盲订,近日关于该车的更多信息曝光,据悉,新车将会在6月份正式上市,7-8月份正式开始交付。腾势N7最低售价:暂无报价图片参数配置暂无报价懂车分暂无懂车实测暂无车友圈4819车友热议二手车暂无而除了此前亮相的版本,近日又一新前脸的版本实车也正式亮相了,新车的版本前杠上的灯带造型重新设计,和此前版本矩阵式光源的灯带不同,新版本是一体式的弧形灯带。据悉,正式上市的版本将会使用两种风格的前脸,可以满足不同审美的消费者。腾势N7的侧面采用了轿跑风格设计,较短的前后悬看上去很动感,整个侧面线条很简洁干练。尺寸上,新车长宽高分别为4860/1935/1602mm,轴距为2940mm,定位中型SUV。车尾部分,车顶使用了镂空式的尾翼,贯穿式的尾灯造型很别致,后杠两侧上部带有导流槽设计,底部使用了空气动力学设计,整体视觉效果很年轻运动。内饰部分使用了全新的设计风格,副驾驶一侧造型和主驾一侧对称,而且也带有一块大屏,包括空调控制区域还有一块单独的触控屏幕,科技感十足。新车采用的是2+3的5座布局,前后座椅都很宽大厚实,其中前排座椅是一体式运动风格的靠背设计。后排座椅支持比例放倒,可以更灵活的扩展空间。动力部分,新车会有两驱和四驱版本,两驱版电机最大功率230千瓦,四驱版前后电机的最大功率分别为160千瓦和230千瓦。根据此前的申报信息显示,新车续航会有630km和702km两种版本。另外新车还将提供双枪超充功能,充电15分钟续航350公里。"},{"id":2,"name":"参数1_图片地址","desc":"","type":"string","exampleValue":"https://p9-dcd-sign.byteimg.com/tos-cn-i-qvj2lq49k0/fd9c256019014fb2bca7e89733cc9223~noop.webp?x-expires=1688138568&x-signature=Yj0YXJiAPZTVW2RvGviggLj3sjs%3D"}],"graph":[{"index":0,"id":0,"parentId":0,"type":-1,"option":0,"title":"root","sequence":[1,2,3],"parameters":{"history":1,"tabIndex":0,"useLoop":false,"xpath":"","wait":0},"isInLoop":false},{"id":1,"index":1,"parentId":0,"type":0,"option":1,"title":"打开网页","sequence":[],"isInLoop":false,"position":0,"parameters":{"useLoop":false,"xpath":"","wait":3,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"url":"https://www.dongchedi.com/article/7238974191096152615","links":"https://www.dongchedi.com/article/7238974191096152615\n","maxWaitTime":10,"scrollType":0,"scrollCount":1,"scrollWaitTime":1}},{"id":2,"index":2,"parentId":0,"type":0,"option":3,"title":"提取数据","sequence":[],"isInLoop":false,"position":1,"parameters":{"history":4,"tabIndex":-1,"useLoop":false,"xpath":"","wait":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"params":[{"nodeType":4,"contentType":6,"relative":false,"name":"参数1_图片页面标题","desc":"","extractType":0,"relativeXPath":"/html/body/div[1]/div[1]/div[2]/div[1]/div[1]/div[1]/aside[1]/div[1]/div[1]/div[1]/div[2]/div[1]/div[1]/a[1]/div[1]/img[1]","allXPaths":["/html/body/div[1]/div[1]/div[2]/div[1]/div[1]/div[1]/aside[1]/div[1]/div[1]/div[1]/div[2]/div[1]/div[1]/a[1]/div[1]/img[1]","//img[contains(., '')]","//IMG[@class='zoom']","//IMG[@alt='6月上市/7月开始交付 腾势N7新增两项盲订权益']"],"exampleValues":[{"num":0,"value":"腾势N7将上市,两种前脸,外观很年轻运动,续航702km_懂车帝"}],"unique_index":"x9gqjnh9rrlibuxxs5","default":"","beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":0,"relative":false,"name":"参数1_文本","desc":"","extractType":0,"relativeXPath":"id(\"article\")","allXPaths":["/html/body/div[1]/div[1]/div[2]/div[1]/div[1]/div[1]/main[1]/section[1]/div[1]/article[1]/div[2]/div[1]/section[1]","//section[contains(., '在此前的上海车展上,')]","id(\"article\")","//SECTION[@class='jsx-3371063651 article-content']"],"exampleValues":[{"num":0,"value":"在此前的上海车展上,腾势N7(图片)已经正式开始盲订,近日关于该车的更多信息曝光,据悉,新车将会在6月份正式上市,7-8月份正式开始交付。腾势N7最低售价:暂无报价图片参数配置暂无报价懂车分暂无懂车实测暂无车友圈4819车友热议二手车暂无而除了此前亮相的版本,近日又一新前脸的版本实车也正式亮相了,新车的版本前杠上的灯带造型重新设计,和此前版本矩阵式光源的灯带不同,新版本是一体式的弧形灯带。据悉,正式上市的版本将会使用两种风格的前脸,可以满足不同审美的消费者。腾势N7的侧面采用了轿跑风格设计,较短的前后悬看上去很动感,整个侧面线条很简洁干练。尺寸上,新车长宽高分别为4860/1935/1602mm,轴距为2940mm,定位中型SUV。车尾部分,车顶使用了镂空式的尾翼,贯穿式的尾灯造型很别致,后杠两侧上部带有导流槽设计,底部使用了空气动力学设计,整体视觉效果很年轻运动。内饰部分使用了全新的设计风格,副驾驶一侧造型和主驾一侧对称,而且也带有一块大屏,包括空调控制区域还有一块单独的触控屏幕,科技感十足。新车采用的是2+3的5座布局,前后座椅都很宽大厚实,其中前排座椅是一体式运动风格的靠背设计。后排座椅支持比例放倒,可以更灵活的扩展空间。动力部分,新车会有两驱和四驱版本,两驱版电机最大功率230千瓦,四驱版前后电机的最大功率分别为160千瓦和230千瓦。根据此前的申报信息显示,新车续航会有630km和702km两种版本。另外新车还将提供双枪超充功能,充电15分钟续航350公里。"}],"unique_index":"t4lzv1jbgl8libuy9uj","default":"","beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0}]}},{"id":3,"index":3,"parentId":0,"type":1,"option":8,"title":"循环","sequence":[4],"isInLoop":false,"position":2,"parameters":{"history":4,"tabIndex":-1,"useLoop":false,"xpath":"id(\"article\")//img","wait":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"scrollType":0,"scrollCount":1,"scrollWaitTime":1,"loopType":1,"pathList":"","textList":"","code":"","waitTime":0,"exitCount":0,"historyWait":2,"breakMode":0,"breakCode":"","breakCodeWaitTime":0,"allXPaths":["/html/body/div[1]/div[1]/div[2]/div[1]/div[1]/div[1]/main[1]/section[1]/div[1]/article[1]/div[2]/div[1]/section[1]/div[1]/img[1]","//img[contains(., '')]"]}},{"id":4,"index":4,"parentId":3,"type":0,"option":3,"title":"提取数据","sequence":[],"isInLoop":true,"position":0,"parameters":{"history":4,"tabIndex":-1,"useLoop":false,"xpath":"","wait":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"params":[{"nodeType":4,"contentType":0,"relative":true,"name":"参数1_图片地址","desc":"","extractType":0,"relativeXPath":"","allXPaths":"","exampleValues":[{"num":0,"value":"https://p9-dcd-sign.byteimg.com/tos-cn-i-qvj2lq49k0/fd9c256019014fb2bca7e89733cc9223~noop.webp?x-expires=1688138568&x-signature=Yj0YXJiAPZTVW2RvGviggLj3sjs%3D"},{"num":1,"value":"https://p6-dcd-sign.byteimg.com/tos-cn-i-qvj2lq49k0/f42b230d05a94aa8ba1b401e51111b46~noop.webp?x-expires=1688138568&x-signature=muye%2BsHfzS2YB19jW8RX3GNCIu4%3D"},{"num":2,"value":"https://p3-dcd-sign.byteimg.com/tos-cn-i-qvj2lq49k0/4e1e272d4a2e4504b028abaa3bd0b602~noop.webp?x-expires=1688138568&x-signature=z32YraHeUVvQ7D73yJWYYTkdeEY%3D"},{"num":3,"value":"https://p6-dcd-sign.byteimg.com/tos-cn-i-qvj2lq49k0/3eb96902ad214f169c30ecdbd0456e76~noop.webp?x-expires=1688138568&x-signature=S6%2BlLKW8fc%2FzSy39gk7p%2BrwVLfw%3D"},{"num":4,"value":"https://p3-dcd-sign.byteimg.com/tos-cn-i-qvj2lq49k0/c16e96f7eed54b6983b6dc064776e9f2~noop.webp?x-expires=1688138568&x-signature=PR2cOC8A1Fd8sb14aBjjIc6FS1w%3D"},{"num":5,"value":"https://p9-dcd-sign.byteimg.com/tos-cn-i-qvj2lq49k0/89bf50f0e23b4dfd8d0c9614f2502f8f~noop.webp?x-expires=1688138568&x-signature=vLP%2BB9Ta5LXHaoOLl%2FJHgK09vbM%3D"},{"num":6,"value":"https://p6-dcd-sign.byteimg.com/tos-cn-i-qvj2lq49k0/59839b2298904b33b0af786a983f7ac8~noop.webp?x-expires=1688138568&x-signature=hg4C25lg0C3C44CQL5thKUcMrAk%3D"}],"unique_index":"8wt7k80ok99libv0xhq","default":"","beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":1}],"loopType":1}}]} \ No newline at end of file +{"id":95,"name":"详情页+图片","url":"https://www.dongchedi.com/article/7238974191096152615","links":"https://www.dongchedi.com/article/7238974191096152615\n","create_time":"5/31/2023, 11:28:40 PM","update_time":"21/12/2023, 14:39:17","version":"0.6.0","saveThreshold":10,"quitWaitTime":60,"environment":0,"maximizeWindow":0,"maxViewLength":15,"recordLog":1,"outputFormat":"xlsx","saveName":"current_time","dataWriteMode":1,"inputExcel":"","startFromExit":0,"pauseKey":"p","containJudge":false,"browser":"chrome","removeDuplicate":0,"desc":"https://www.dongchedi.com/article/7238974191096152615","inputParameters":[{"id":0,"name":"urlList_0","nodeId":1,"nodeName":"打开网页","value":"https://www.dongchedi.com/article/7238974191096152615\n","desc":"要采集的网址列表,多行以\\n分开","type":"text","exampleValue":"https://www.dongchedi.com/article/7238974191096152615\n"}],"outputParameters":[{"id":0,"name":"参数1_图片页面标题","desc":"","exampleValue":"腾势N7将上市,两种前脸,外观很年轻运动,续航702km_懂车帝"},{"id":1,"name":"参数1_文本","desc":"","exampleValue":"在此前的上海车展上,腾势N7(图片)已经正式开始盲订,近日关于该车的更多信息曝光,据悉,新车将会在6月份正式上市,7-8月份正式开始交付。腾势N7最低售价:暂无报价图片参数配置暂无报价懂车分暂无懂车实测暂无车友圈4819车友热议二手车暂无而除了此前亮相的版本,近日又一新前脸的版本实车也正式亮相了,新车的版本前杠上的灯带造型重新设计,和此前版本矩阵式光源的灯带不同,新版本是一体式的弧形灯带。据悉,正式上市的版本将会使用两种风格的前脸,可以满足不同审美的消费者。腾势N7的侧面采用了轿跑风格设计,较短的前后悬看上去很动感,整个侧面线条很简洁干练。尺寸上,新车长宽高分别为4860/1935/1602mm,轴距为2940mm,定位中型SUV。车尾部分,车顶使用了镂空式的尾翼,贯穿式的尾灯造型很别致,后杠两侧上部带有导流槽设计,底部使用了空气动力学设计,整体视觉效果很年轻运动。内饰部分使用了全新的设计风格,副驾驶一侧造型和主驾一侧对称,而且也带有一块大屏,包括空调控制区域还有一块单独的触控屏幕,科技感十足。新车采用的是2+3的5座布局,前后座椅都很宽大厚实,其中前排座椅是一体式运动风格的靠背设计。后排座椅支持比例放倒,可以更灵活的扩展空间。动力部分,新车会有两驱和四驱版本,两驱版电机最大功率230千瓦,四驱版前后电机的最大功率分别为160千瓦和230千瓦。根据此前的申报信息显示,新车续航会有630km和702km两种版本。另外新车还将提供双枪超充功能,充电15分钟续航350公里。"},{"id":2,"name":"参数1_图片地址","desc":"","exampleValue":"https://p9-dcd-sign.byteimg.com/tos-cn-i-qvj2lq49k0/fd9c256019014fb2bca7e89733cc9223~noop.webp?x-expires=1688138568&x-signature=Yj0YXJiAPZTVW2RvGviggLj3sjs%3D"}],"graph":[{"index":0,"id":0,"parentId":0,"type":-1,"option":0,"title":"root","sequence":[1,2,3],"parameters":{"history":1,"tabIndex":0,"useLoop":false,"xpath":"","wait":0},"isInLoop":false},{"id":1,"index":1,"parentId":0,"type":0,"option":1,"title":"打开网页","sequence":[],"isInLoop":false,"position":0,"parameters":{"useLoop":false,"xpath":"","wait":3,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"url":"https://www.dongchedi.com/article/7238974191096152615","links":"https://www.dongchedi.com/article/7238974191096152615\n","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":4,"tabIndex":-1,"useLoop":false,"xpath":"","wait":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"params":[{"nodeType":4,"contentType":6,"relative":false,"name":"参数1_图片页面标题","desc":"","extractType":0,"relativeXPath":"/html/body/div[1]/div[1]/div[2]/div[1]/div[1]/div[1]/aside[1]/div[1]/div[1]/div[1]/div[2]/div[1]/div[1]/a[1]/div[1]/img[1]","allXPaths":["/html/body/div[1]/div[1]/div[2]/div[1]/div[1]/div[1]/aside[1]/div[1]/div[1]/div[1]/div[2]/div[1]/div[1]/a[1]/div[1]/img[1]","//img[contains(., '')]","//IMG[@class='zoom']","//IMG[@alt='6月上市/7月开始交付 腾势N7新增两项盲订权益']"],"exampleValues":[{"num":0,"value":"腾势N7将上市,两种前脸,外观很年轻运动,续航702km_懂车帝"}],"unique_index":"x9gqjnh9rrlibuxxs5","default":"","beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":0,"relative":false,"name":"参数1_文本","desc":"","extractType":0,"relativeXPath":"id(\"article\")","allXPaths":["/html/body/div[1]/div[1]/div[2]/div[1]/div[1]/div[1]/main[1]/section[1]/div[1]/article[1]/div[2]/div[1]/section[1]","//section[contains(., '在此前的上海车展上,')]","id(\"article\")","//SECTION[@class='jsx-3371063651 article-content']"],"exampleValues":[{"num":0,"value":"在此前的上海车展上,腾势N7(图片)已经正式开始盲订,近日关于该车的更多信息曝光,据悉,新车将会在6月份正式上市,7-8月份正式开始交付。腾势N7最低售价:暂无报价图片参数配置暂无报价懂车分暂无懂车实测暂无车友圈4819车友热议二手车暂无而除了此前亮相的版本,近日又一新前脸的版本实车也正式亮相了,新车的版本前杠上的灯带造型重新设计,和此前版本矩阵式光源的灯带不同,新版本是一体式的弧形灯带。据悉,正式上市的版本将会使用两种风格的前脸,可以满足不同审美的消费者。腾势N7的侧面采用了轿跑风格设计,较短的前后悬看上去很动感,整个侧面线条很简洁干练。尺寸上,新车长宽高分别为4860/1935/1602mm,轴距为2940mm,定位中型SUV。车尾部分,车顶使用了镂空式的尾翼,贯穿式的尾灯造型很别致,后杠两侧上部带有导流槽设计,底部使用了空气动力学设计,整体视觉效果很年轻运动。内饰部分使用了全新的设计风格,副驾驶一侧造型和主驾一侧对称,而且也带有一块大屏,包括空调控制区域还有一块单独的触控屏幕,科技感十足。新车采用的是2+3的5座布局,前后座椅都很宽大厚实,其中前排座椅是一体式运动风格的靠背设计。后排座椅支持比例放倒,可以更灵活的扩展空间。动力部分,新车会有两驱和四驱版本,两驱版电机最大功率230千瓦,四驱版前后电机的最大功率分别为160千瓦和230千瓦。根据此前的申报信息显示,新车续航会有630km和702km两种版本。另外新车还将提供双枪超充功能,充电15分钟续航350公里。"}],"unique_index":"t4lzv1jbgl8libuy9uj","default":"","beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0}]}},{"id":3,"index":3,"parentId":0,"type":1,"option":8,"title":"循环","sequence":[4],"isInLoop":false,"position":2,"parameters":{"history":4,"tabIndex":-1,"useLoop":false,"xpath":"id(\"article\")//img","wait":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"scrollType":0,"scrollCount":1,"scrollWaitTime":1,"loopType":1,"pathList":"","textList":"","code":"","waitTime":0,"exitCount":0,"historyWait":2,"breakMode":0,"breakCode":"","breakCodeWaitTime":0,"allXPaths":["/html/body/div[1]/div[1]/div[2]/div[1]/div[1]/div[1]/main[1]/section[1]/div[1]/article[1]/div[2]/div[1]/section[1]/div[1]/img[1]","//img[contains(., '')]"]}},{"id":4,"index":4,"parentId":3,"type":0,"option":3,"title":"提取数据","sequence":[],"isInLoop":true,"position":0,"parameters":{"history":4,"tabIndex":-1,"useLoop":false,"xpath":"","wait":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"params":[{"nodeType":4,"contentType":0,"relative":true,"name":"参数1_图片地址","desc":"","extractType":0,"relativeXPath":"","allXPaths":"","exampleValues":[{"num":0,"value":"https://p9-dcd-sign.byteimg.com/tos-cn-i-qvj2lq49k0/fd9c256019014fb2bca7e89733cc9223~noop.webp?x-expires=1688138568&x-signature=Yj0YXJiAPZTVW2RvGviggLj3sjs%3D"},{"num":1,"value":"https://p6-dcd-sign.byteimg.com/tos-cn-i-qvj2lq49k0/f42b230d05a94aa8ba1b401e51111b46~noop.webp?x-expires=1688138568&x-signature=muye%2BsHfzS2YB19jW8RX3GNCIu4%3D"},{"num":2,"value":"https://p3-dcd-sign.byteimg.com/tos-cn-i-qvj2lq49k0/4e1e272d4a2e4504b028abaa3bd0b602~noop.webp?x-expires=1688138568&x-signature=z32YraHeUVvQ7D73yJWYYTkdeEY%3D"},{"num":3,"value":"https://p6-dcd-sign.byteimg.com/tos-cn-i-qvj2lq49k0/3eb96902ad214f169c30ecdbd0456e76~noop.webp?x-expires=1688138568&x-signature=S6%2BlLKW8fc%2FzSy39gk7p%2BrwVLfw%3D"},{"num":4,"value":"https://p3-dcd-sign.byteimg.com/tos-cn-i-qvj2lq49k0/c16e96f7eed54b6983b6dc064776e9f2~noop.webp?x-expires=1688138568&x-signature=PR2cOC8A1Fd8sb14aBjjIc6FS1w%3D"},{"num":5,"value":"https://p9-dcd-sign.byteimg.com/tos-cn-i-qvj2lq49k0/89bf50f0e23b4dfd8d0c9614f2502f8f~noop.webp?x-expires=1688138568&x-signature=vLP%2BB9Ta5LXHaoOLl%2FJHgK09vbM%3D"},{"num":6,"value":"https://p6-dcd-sign.byteimg.com/tos-cn-i-qvj2lq49k0/59839b2298904b33b0af786a983f7ac8~noop.webp?x-expires=1688138568&x-signature=hg4C25lg0C3C44CQL5thKUcMrAk%3D"}],"unique_index":"8wt7k80ok99libv0xhq","default":"","beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":1}],"loopType":1}}]} \ No newline at end of file diff --git a/ElectronJS/EasySpider_en.crx b/ElectronJS/EasySpider_en.crx deleted file mode 100644 index 84c87404..00000000 Binary files a/ElectronJS/EasySpider_en.crx and /dev/null differ diff --git a/ElectronJS/EasySpider_zh.crx b/ElectronJS/EasySpider_zh.crx deleted file mode 100644 index cea8078f..00000000 Binary files a/ElectronJS/EasySpider_zh.crx and /dev/null differ diff --git a/ElectronJS/package_linux64.sh b/ElectronJS/package_linux64.sh index 2214fdeb..46a64727 100755 --- a/ElectronJS/package_linux64.sh +++ b/ElectronJS/package_linux64.sh @@ -36,4 +36,4 @@ rm -rf ../.temp_to_pub/EasySpider_Linux_x64/Data mkdir ../.temp_to_pub/EasySpider_Linux_x64/Data rm EasySpider_zh.crx rm EasySpider_en.crx -cp -Rf ../tasks/* ../.temp_to_pub/EasySpider_Linux_x64/tasks +cp -Rf ./tasks/* ../.temp_to_pub/EasySpider_Linux_x64/tasks diff --git a/ExecuteStage/generateExecutable_Linux64.sh b/ExecuteStage/generateExecutable_Linux64.sh index 3ee6cd07..d6e269a8 100755 --- a/ExecuteStage/generateExecutable_Linux64.sh +++ b/ExecuteStage/generateExecutable_Linux64.sh @@ -1,5 +1,5 @@ rm -r build rm -r dist -pyinstaller -F --icon=favicon.ico easyspider_executestage.py +pyinstaller -F --icon=favicon.ico --add-data "/home/naibo/miniconda3/lib/python3.8/site-packages/onnxruntime/capi/onnxruntime_pybind11_state.cpython-38-x86_64-linux-gnu.so:onnxruntime/capi" --add-data "/home/naibo/miniconda3/lib/python3.8/site-packages/ddddocr/common_old.onnx:ddddocr" easyspider_executestage.py rm ../ElectronJS/chrome_linux64/easyspider_executestage cp dist/easyspider_executestage ../ElectronJS/chrome_linux64/easyspider_executestage