YQL +表 + X路径

发布于 2024-11-17 08:24:36 字数 550 浏览 3 评论 0原文

我正在与 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

一花一树开 2024-11-24 08:24:36

如何在此范围内使用 YQL OPEN TABLE!???!

请花时间仔细阅读创建 YQL 开放数据表章节。

特别是 块 ( docs)将使您能够执行上面提到的所有操作。

How to use YQL OPEN TABLE for this scope!??!

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文