有 jQuery 网页抓取工具吗?
我正在尝试使用 jQuery 和 Adobe AIR 从外部站点提取一些信息。现在我正在使用隐藏的 div
和 jQuery 的加载函数来加载外部站点的片段,一旦加载信息,我就会使用选择器解析一些信息。这很好,但有点脏,我需要执行几次(不想需要很多隐藏的 div)。
只是想知道是否有人知道用 jQuery 编写的优秀网络爬虫或者我缺少的另一种方法
I'm trying to pullout some info from an external site using jQuery and Adobe AIR. Right now I'm using a hidden div
and jQuery's load function to load fragments of the external site, once the info is loaded I parse some info with selectors. This is fine but it's kinda dirty and I need to perform this several times (don't want to need many hidden divs).
Just wondering if anybody knows a good webscraper written in jQuery or maybe another method I'm missing
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以直接在 ajax 响应主体上使用选择器:
You can use selectors directly on the ajax response body:
您可以简单地调用
$.ajax
,然后通过编写$(responseHTML)
创建一个分离的 DOM 树。You can simply call
$.ajax
, then create a detached DOM tree by writing$(responseHTML)
.