我試圖讓前一個字符串「 - 」使用XPath在HTML頁面中一個段落內,並將其發送給YQL使用YQL與子-前的XPath
比如我想獲取日期從下面的文章:
<div> <p>Date --- the body of the article</p> </div>
我想這個查詢在YQL:
select * from html where url="article url" and xpath="//div/p/text()/[substring-before(.,'--')]"
,但它不工作。
我怎麼能得到文章的日期是前 ' - '
好問題,+1。查看我的答案,獲得完整,簡短和簡單的解決方案。 –