Hint: Save Successfully!
提示：保存名不符合MySQL表名规范，请重试！
提示：您加载的任务版本不是最新版，可能出现兼容性问题。
Toolkit
-----------------
Drag button above to the flowchart to insert.

■

#### Equivalent XPath

The following are alternative XPath expressions, in addition to the default generated XPath, that can all locate the same element (although not entirely accurate, they may also locate other elements besides the intended one, so they are provided here for reference only). Each line contains an XPath expression (you can use the pre-installed XPath Helper extension for debugging): {{XPaths}}
Option Name:

Use link inside the Loop

Links (one link per line, the entire workflow will be executed as many times as there are lines of links): Link (Only one link can be put here)
Maximum wait time for page load (in seconds): After executed, whether scroll down:
Scroll Times (the wait time after scrolling ineffective when the scrolling type is set to no scrolling): Wait time after scrolling (in seconds):

Click here to expand/collapse advanced operations

Set Cookies after page loaded:

Click here to get cookies of current page

Element is inside iframe

Use element located by xpath relative to the loop

XPath: ☺

Maximum wait time for page load after clicking (in seconds): Click Type:
Whether to scroll down after clicking:
Scroll Times: Wait time after scrolling (in seconds):

Click here to expand/collapse advanced operations

Execute a JavaScript script before clicking on this element: Maximum wait time for script execution (0 represents unlimited wait time): Execute a JavaScript script after clicking on this element: Maximum wait time for script execution (0 represents unlimited wait time):

Clear other field existing values before extracting

Field Name | Example Value | Operations
--- | --- | ---

| {{paras.parameters[i-1]["exampleValues"][0]["value"]}} | Modify Delete Up Down

Current parameter name (Clicking on the "Modify" option of the field toggles the parameters)

{{paras.parameters[paraIndex]["name"]}}

Use relative XPath

Element is inside iframe

XPATH (Field["FieldName"] can be used in any XPATHS): ☺

Click here to expand/collapse advanced operations

Execute a JavaScript script before extracting data from this element: Maximum wait time for script execution (0 represents unlimited wait time): Execute a JavaScript script after extracting data from this element: Maximum wait time for script execution (0 represents unlimited wait time):
Parameter type conversion (for Excel and Database):
Default value when cannot find this element: Extract Type
Attribute Name:
Code (Use Field["FieldName"] to input the lastest value of a field): Maximum wait time for script execution (0 represents unlimited wait time):
Node Type
Whether to download image after extracting the image address:
Whether to save this field: (Choose 'No' if you only want to treat this field as a variable and not save it):
Parameter Description:

Element is inside iframe

Use text from the loop (If unchecked, the text entered each time will be the text from the "Input Value" text box below. If checked, it will use the text set within the loop.)

Index value (0 represents using the entire current loop text. If greater than 0, it represents the text index value separated by "~" within the current loop. For example, if the current loop text value is A~B, index value 1 represents inputting A, 2 represents inputting B, and 0 represents inputting A~B)

Input value (Use Field["FieldName"] to input the latest extracted/returned value of a field or custom operation. Use <enter> or <ENTER> to simulate pressing the Enter key):
XPath: ☺

Click here to expand/collapse advanced operations

Execute JavaScript script on this element before entering text into it: Maximum wait time for script execution (0 represents unlimited wait time): Execute JavaScript script on this element after entering text into it: Maximum wait time for script execution (0 represents unlimited wait time):

Action is inside iframe

Custom Action Mode
Code (Use Field["FieldName"] to input the lastest value of a field):

    Please read the instructions first and then write the specific code in the input box above (not in this box).
    This option is an advanced feature that allows direct manipulation of the running browser using Python code. You can also customize variables in the entire execution environment and perform operations such as modifying and assigning values. Here are some examples:
    1. Use `self.browser` to refer to the current browser being operated. You can directly use Selenium's API to perform operations, such as `self.browser.find_element(By.CSS_SELECTOR, "body").send_keys(Keys.END)` to scroll to the bottom.
    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)`

    If you want to record your custom variable as a field, please select the next option, "Evaluate Python expressions in the execution environment."

    If you want to import and use a third-party library that the program itself does not carry, you need to first use tools such as pip to install this library locally, and then add the path of the installed library before import, like:
    (1) In the system command line execute the following command to install the library:
    pip install emotlib
    (2) Write the following code in the code box:
    sys.path.append("D:/Python38/Lib/site-packages") # Assume emotlib library exists in this path
    import emotlib # Now you can use emotlib library
    print(emotlib.emoji()) # Use one of its functions.

    Please read the instructions first and then write the specific code in the input box above (not in this box).
    This option is an advanced feature that allows directly returning the expression value of Python code, and in other places, use Field["FieldName"] to represent the return value of this operation.. Here are some examples:
    1. Return relevant values of the current browser object. Use `self.browser` to refer to the current browser being operated. You can directly use Selenium's API to perform operations, such as `self.browser.find_element(By.CSS_SELECTOR, "body").text` to return the text on the current page.
    2. Return the value of a custom global variable: `self.myVar`
    3. Return the result of a conditional statement: `self.myVar == 1`
    Please note that this feature does not support assigning values to variables. In other words, you cannot write something like `self.myVar = 1`. If you want to perform assignment operations, please select the previous option, "Evaluate Python expressions in the execution environment."

Whether to record the output/return value of the execution as a field:

Convert parameter type to:

Clear values of other parameters before record as a field:

Maximum wait time for script execution (0 represents unlimited wait time):

Element is inside iframe

Use index value from within the loop (if unchecked, the setting will be the value of the "Set Value" text box below. If checked, it will use the index value set within the loop's dropdown box.)

Relative index value of the loop value (0 represents using the entire current loop's text. If greater than 0, it represents the value of the text separated by "~" within the current loop. For example, if the current loop's text value is 2~3 and you enter 2 here, it means taking the second item of the text, which is value 3, indicating setting the dropdown box to the third item.)

XPath:

Option switch Mode

Set value (not applicable for "Switch to the next option" mode)

Element is inside iframe

Use element located by xpath relative to the loop

XPath:

Operation is in iframe

Loop Type:
XPath: ☺

XPath List:
Content List (Use Field["FieldName"] to input the lastest value of a field):
Code (Use Field["FieldName"] to input the lastest value of a field):

    Please read the instructions first and then write the specific code in the input box above (not in this box).
    Loop based on the expression value of Python code. Here are some examples:
    1. Return relevant values of the current browser object. Use `self.browser` to refer to the current browser being operated. You can directly use Selenium's API to perform operations, such as `self.browser.find_element(By.CSS_SELECTOR, "body").text=="123"`, which checks whether the current page contains the text "123".
    2. Return the value of a custom global variable: `self.myVar`
    3. Return the result of a conditional statement: `self.myVar == 1`
    If the expression returns a value greater than 0 or evaluates to True, the loop continues; otherwise, it stops.

Maximum wait time for script execution (0 represents unlimited wait time):
Max Loop time (0 means infinite until cannot find the element or page content doesn't change):

(Advanced Operation) Define loop exit condition using code/script; or you can add a Custom Action, then select the "Exit Loop" option:

Maximum wait time for script execution (0 represents unlimited wait time):
Waiting time in seconds after a history record rollback: After executed, whether scroll down:
Scroll Times: Wait time after scrolling (in seconds):
The conditions are evaluated from left to right, which means if the condition in the leftmost branch is satisfied, the operations within that branch are executed. Otherwise, the condition in the next branch from left to right is evaluated, and so on.
The conditions are evaluated from left to right, which means if the condition in the leftmost branch is satisfied, the operations within that branch are executed. Otherwise, the condition in the next branch from left to right is evaluated, and so on.

Operation is in iframe

Condition Type:
Text/Element XPath to Include: ☺
Code/Script Content:

    Please read the instructions first and then write the specific code in the input box above (not in this box).
    Use the expression value of Python code to determine whether a condition is satisfied. Here are some examples:
    1. Return relevant values of the current browser object. Use `self.browser` to refer to the current browser being operated. You can directly use Selenium's API to perform operations, such as `self.browser.find_element(By.CSS_SELECTOR, "body").text=="123"`, which checks whether the current page contains the text "123".
    2. Return the value of a custom global variable: `self.myVar`
    3. Return the result of a conditional statement: `self.myVar == 1`
    If the expression returns a value greater than 0 or evaluates to True, the operations within this branch will be executed; otherwise, they will be skipped.

Maximum wait time for script execution (0 represents unlimited wait time):
Code/Script Content (Click here for more examples): Maximum wait time for script execution (0 represents unlimited wait time):
Wait for the following elements to appear before executing: In which iframe is the element located? Set to 0 if the element is not inside an iframe: Maximum waiting time for element appearance (in seconds): Wait seconds after execution (can set decimal values, e.g., 0.5): Wait Type

#### Save Task (Can press Ctrl + S to open this modal)

Task Name: Task Description: Export Data Format (Excel/CSV/TXT/Database):
Export File Name/Database Table Name (Can use ../ to represent relative path to change the file save location,the keyword "current_time" will be replaced with the timestamp when the task is executed): Is it an extreme anti-scraping website like Cloudflare (Watch Tutorial)?
To modify the input parameters of each operation during execution, read the following Excel (.xlsx) file. Please click the "Read Input Parameters from Excel File" button when calling the task to view the file format: Browser Emulation Type:
Save Data Every N Rows (Specify N below, the larger the value, the faster the scraping speed, but there is a risk of data loss if unexpectedly exited): Do you want to resume execution from the last saved position when unexpectedly exiting and restarting the task (The record interval of the number of collected items is the value set above)?
Maximum Display Length of Data in Console Preview: Record log when executing the task: