【发布时间】:2014-07-13 08:15:31
【问题描述】:
我用 nutch 做了一些实验来抓取没有任何 ajax 调用的网站,我得到了所有数据。
我执行了以下步骤来获取数据。
- user@localhost:~/sample/nutch/runtime/local/bin$ ./nutch 注入 /path/to/the/seed.txt
- $: ./nutch 生成 -batchId 321
- $: ./nutch fetch 321
- $: ./nutch 解析 321
- $: ./nutch 更新b
我有 hbase 作为存储在 hdfs 上的文件。如果我执行这 5 个步骤,如果 url 是 http://www.naaptol.com/brands/nokia/mobile-phones.html,它会给我所有数据,但如果我将它更改为 http://www.flipkart.com/mens-footwear/shoes/sports-shoes/pr?sid=osp,cil,nit,1cu&otracker=hp_nmenu_sub_men_0_Sports%20Shoes,它什么也没有
我的 nutch-site.xml 文件:
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<!-- Put site-specific property overrides in this file. -->
<configuration>
<property>
<name>storage.data.store.class</name>
<value>org.apache.gora.hbase.store.HBaseStore</value>
<description>Default class for storing data</description>
</property>
<property>
<name>http.agent.name</name>
<value>com.datametica.agent</value>
<description>this is just an agent name</description>
</property>
<property>
<name>http.robots.agents</name>
<value>datametica_robot</value>
<description>this is just a robot</description>
</property>
<property>
<name>plugin.folders</name>
<value>/home/sachin/source_codes/svn/nutch/nutch_2.x/build/plugins</value>
</property>
</configuration>
【问题讨论】:
标签: hbase hdfs nutch web-crawler