YQL +表 + X路径
我正在与 YQL 合作。我了解如何对网页进行简单查询并使用 xpath 选择内容。
例如: select * from html where url="http://www.animeclick.it/manga.php?xtit=Ranmaru+XXX"
和 xpath="/html/body/ div/table/tr/td/table/tr/td/div/div/img[包含(@src,'manga')]"
。
现在,这种方法存在局限性。我无法登录该站点,无法在页面中重复不同的信息(我知道可以进行更多查询或添加新的 xpath 表达式)并且我无法格式化输出结果
(like inside div this content :
"<p> Hello <a src="#"> Boy!</a></p>" ,
where in this case i need the text "Hello boy")
如何在此范围内使用 YQL OPEN TABLE! ??!
I'm working with YQL. I understand how to make a simple query to a web page and select content with xpath.
For example: select * from html where url="http://www.animeclick.it/manga.php?xtit=Ranmaru+XXX"
and xpath="/html/body/div/table/tr/td/table/tr/td/div/div/img[contains(@src,'manga')]"
.
Now, there are limitation in this approach. I can't make login to the site, can't repeat different information in the page (I know can make more query or add new xpath expression) and I can't format output result
(like inside div this content :
"<p> Hello <a src="#"> Boy!</a></p>" ,
where in this case i need the text "Hello boy")
How to use YQL OPEN TABLE for this scope!??!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
请花时间仔细阅读创建 YQL 开放数据表章节。
特别是
块 ( docs)将使您能够执行上面提到的所有操作。Please take the time to have a thorough read through the Creating YQL Open Data Tables chapters in the YQL docs.
In particular, an
<execute>
block (docs) will enable you to do all of the things that you mentioned above.