我正在尝试创建Distille警报,并使用字段选择器创建了以下代码。我试图从页面比较中排除以下字段:
/div[contains(@class,'MUxGbd')]/span[contains(@class,'MUxGbd')]
该代码在整个页面中都是相同的,但每个结果的路径都会发生变化。
如何将代码修改为"任意"路径-例如:
//div[@id='rso']/**any**/div[contains(@class,'MUxGbd')]/span[contains(@class,'MUxGbd')]
谢谢,
{
"selections": [
{
"frames": [
{
"index": 0,
"excludes": [
{
"type": "xpath",
"expr": "//div[@id='rso']/div[@class='hlcw0c']/div[@class='g']//div[@class='tF2Cxc']/div[@class='IsZvec']/div[contains(@class,'MUxGbd')]/span[contains(@class,'MUxGbd')]"
},
{
"type": "xpath",
"expr": "//div[@id='rso']/div[@class='g']//div[@class='tF2Cxc']/div[@class='IsZvec']/div[contains(@class,'MUxGbd')]/span[contains(@class,'MUxGbd')]"
}
],
"includes": [
{
"type": "xpath",
"expr": "//div[@id='rso']"
}
]
}
],
"dynamic": true,
"delay": 0
}
],
"ignoreEmptyText": true,
"includeStyle": false,
"dataAttr": "text"
}
你试过吗
"//div[@id='rso']//div[contains(@class,'MUxGbd')]/span[contains(@class,'MUxGbd')]"