我想用KRL查詢()來得到一個嵌套的DIV標籤,但它抱怨與我可以在KRL查詢()選擇器中使用>運算符嗎?
ERROR Rules.pm a8x40 show_xfers Ruleset a8x40 failed: html.query error - Invalid specification ">div" in query: div.recent-transfer>div
這裏是HTML片段(有多個文件中):
<div class='recent-transfer'>
<span>...</span>
<div> <!-- * * * -->
<div>...</div>
<div>...</div>
</div>
</div>
這裏是我的功能:
recent = function() {
t = http:get(the_url).pick("$..content");
t.query("div.recent-transfer>div")
}
我要選擇DIV標記* * *
。我需要鏈接幾個query()語句來獲得DIV嗎?
原庫不支持「>」(子)運算符。最近推出了具有更新庫的新服務器(應該也支持'+'btw)。 必須將更新的庫推送到所有服務器 - 可能在今天晚些時候,也許明天早上。 – MEH 2011-03-29 19:37:50
'@ MEH'您的評論將更適合作爲答案,因爲它畢竟是答案。 – Alex 2011-03-30 03:33:17