关于Nutch抓取经过身份验证的网站

时间:2017-02-15 11:19:36

标签: nutch

我们需要从使用用户名和密码进行身份验证的网址抓取数据。 1)我们使用以下凭据配置了httpclient-auth.xml

<credentials username="xxxx" password="xxxxxx">
 <default/>
</credentials>

2)我们使用以下属性配置了nutch-site.xml

<property>
  <name>http.agent.name</name>
  <value>Nutch Crawl</value>
</property>

<property>
  <name>plugin.includes</name>
  <value>protocol-httpclient|urlfilter-regex|parse-(html|tika)|index-(basic|anchor)|scoring-opic|urlnormalizer-(pass|regex|basic)</value>
</property>

<property>
  <name>http.auth.file</name>
  <value>httpclient-auth.xml</value>
  <description>Authentication configuration file for 'protocol-httpclient' plugin.</description>
</property>

当我们尝试获取数据时,我们只获得了seed.txt文件中存在的一个Url,但我们没有收到任何错误,但仍然只获得了一个已爬网的数据。

我们在这里缺少什么。

0 个答案:

没有答案