nutch2.x不是像flipkart和jabong这样的爬行网站

busg9geu  于 2021-06-09  发布在  Hbase
关注(0)|答案(1)|浏览(408)

我用nutch做了一些实验来抓取没有ajax调用的网站,我得到了所有的数据。
我执行以下步骤来获取数据。
user@localhost用法:~/sample/nutch/runtime/local/bin$./nutch inject/path/to/the/seed.txt
$:./nutch generate-批处理ID 321
$:/坚果321
$:/坚果分析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\u sub\u men\u 0\u sports%20它什么也没给我
我的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>
s3fp2yjn

s3fp2yjn1#

regex urlfilter阻止具有querystring参数的URL:

跳过包含某些字符的URL作为可能的查询等。

-[?*!@=]
修改该文件,以便对具有querystring参数的URL进行爬网:

跳过包含某些字符的URL作为可能的查询等。

-[*!@]
nutch可能缺乏对ajax页面爬行的支持。看到这个了吗
你可以看看https://issues.apache.org/jira/browse/nutch-1323

相关问题