使用的Nutch如何抓取网页被uisng AJAX动态内容? [英] Using Nutch how to crawl the dynamic content of web page that are uisng ajax?

查看:211
本文介绍了使用的Nutch如何抓取网页被uisng AJAX动态内容?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的Apache的Nutch 1.10抓取的网页,并提取网页中的内容。有些链接中包含有关于Ajax的调用加载动态内容。 Nutch的能不能抓取和提取AJAX的动态内容。我该如何解决这个问题?有没有什么解决办法吗?如果有,请帮我看看你的答案。

I am using apache Nutch 1.10 to crawl the web pages and to extract the contents in the page. Some of the links contains dynamic contents which are loaded on the call of ajax. Nutch cannot able to crawl and extract the dynamic contents of ajax. How can I solve this? Is there any solution? if yes please help me with your answers.

在此先感谢。

推荐答案

大多数的网络爬虫库不提供的JavaScript渲染开箱。你通常需要另一个插件库或产品,提供JS渲染像硒或PhantomJS。

Most web crawler libraries do not offer javascript rendering out of the box. You usually have to plugin another library or product that offers js rendering like Selenium or PhantomJS.

下面是使用Nutch的硒<一个教程/ A>。

Here is a tutorial using nutch and Selenium.

这篇关于使用的Nutch如何抓取网页被uisng AJAX动态内容?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆