Judge
crawlipt提供了if和check两个关键词结合condition方法来进行action方法执行前的逻辑判断
if关键词
{
"method": "input",
"xpath": "//*[@id=\"kw\"]",
"text": "your search text",
"if": {
"condition": "presence",
"xpath": "//*[@id=\"su\"]"
}
}check关键词
{
"method": "input",
"xpath": "//*[@id=\"kw\"]",
"text": "your search text",
"check": {
"condition": "presence",
"xpath": "//*[@id=\"su\"]"
}
}
//等价于
{
"check": {
"condition": "presence",
"xpath": "//*[@id=\"su\"]"
},
"next": {
"method": "input",
"xpath": "//*[@id=\"kw\"]",
"text": "your search text"
}
}最后更新于