Variable
Variables can enhance the flexibility and scalability of scripts, and can dynamically control the running of scripts.
Script Example
Variables can be set in any parameter of the script (except for keywords such as "method", "next", "if", "check", "condition", and "loop").
When writing script variables, the identifier "_v - {your variable} __" needs to be used. Otherwise, it will be judged as a normal parameter processing during syntax checking.
Implement your own variable object
You need to inherit the VariableBase object and implement the "get" and "__ contains__" methods.
The above implementation is already built-in in crawlipt.
Built-in variable object
The variables in the script will be automatically replaced during execution, and you can create a built-in Variable object in crawlipt with initialization parameters in dictionary or JSON format strings. The dictionary needs to correspond your variable names and values one-to-one, and during execution, it will replace the variable names in the script with the variable values you set.
Last updated