锘??xml version="1.0" encoding="utf-8" standalone="yes"?>国内成人精品视频,亚洲+变态+欧美+另类+精品,精品91久久久久http://www.aygfsteel.com/rainsf/archive/2007/04/27/114022.html灝忛奔灝忛奔Fri, 27 Apr 2007 03:09:00 GMThttp://www.aygfsteel.com/rainsf/archive/2007/04/27/114022.htmlhttp://www.aygfsteel.com/rainsf/comments/114022.htmlhttp://www.aygfsteel.com/rainsf/archive/2007/04/27/114022.html#Feedback0http://www.aygfsteel.com/rainsf/comments/commentRss/114022.htmlhttp://www.aygfsteel.com/rainsf/services/trackbacks/114022.html      浠婂ぉ灝忚瘯浜嗕竴涓婲utch-0.9,絎旇濡備笅錛?br>      
1銆佽В鍘婲utch鍖咃紝鍦∟utch鏍圭洰褰曚笅寤虹洰褰晆rls,閲岄潰寤轟竴浜涘寘鍚玌RL鐨勬枃鏈urlt.txt錛屼竴琛屼竴涓猆RL,鍐呭濡傦細(xì)http://www.aygfsteel.com
http://www.javaeye.com/


2銆佷慨鏀筩onf鐩綍涓嬬殑crawl-urlfilter.txt,鐗囨柇濡備笅錛?br># accept hosts in MY.DOMAIN.NAME
# +^http://([a-z0-9]*\.)*MY.DOMAIN.NAME/
+^http://www.aygfsteel.com/
+^http://www.javaeye.com/
+^http://lucene.apache.org/

3銆佷慨鏀筩onf鐩綍涓嬬殑nutch-site.xml錛屽唴瀹瑰涓嬶細(xì)
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>

<!-- Put site-specific property overrides in this file. -->

<configuration>

    
<property>
      
<name>http.agent.name</name>
      
<value>Nutch</value>
      
<description>HTTP 'User-Agent' request header. MUST NOT be empty - 
      please set this to a single word uniquely related to your organization.

      NOTE: You should also check other related properties:

        http.robots.agents
        http.agent.description
        http.agent.url
        http.agent.email
        http.agent.version

      and set their values appropriately.

      
</description>
    
</property>

    
<property>
      
<name>http.robots.agents</name>
      
<value>Nutch,*</value>
      
<description>The agent strings we'll look for in robots.txt files,
      comma-separated, in decreasing order of precedence. You should
      put the value of http.agent.name as the first agent name, and keep the
      default * at the end of the list. E.g.: BlurflDev,Blurfl,*
      
</description>
    
</property>

    
<property>
      
<name>http.agent.description</name>
      
<value>Nutch Search Engineer</value>
      
<description>Further description of our bot- this text is used in
      the User-Agent header.  It appears in parenthesis after the agent name.
      
</description>
    
</property>

    
<property>
      
<name>http.agent.url</name>
      
<value>http://lucene.apache.org/nutch/bot.html</value>
      
<description>A URL to advertise in the User-Agent header.  This will 
       appear in parenthesis after the agent name. Custom dictates that this
       should be a URL of a page explaining the purpose and behavior of this
       crawler.
      
</description>
    
</property>

    
<property>
      
<name>http.agent.email</name>
      
<value>nutch-agent@lucene.apache.org</value>
      
<description>An email address to advertise in the HTTP 'From' request
       header and User-Agent header. A good practice is to mangle this
       address (e.g. 'info at example dot com') to avoid spamming.
      
</description>
    
</property>

</configuration>

娉ㄦ剰錛氬湪nutch-0.9.jar閲岄潰宸插寘鍚玭utch-site.xml錛?nbsp; conf鐩綍涓嬬殑鏂囦歡閮藉鍒惰繃鍒癱lasspath鏍逛笅錛屽鏋滄槸鍦╓EB鐜涓嬭繍琛宑lasspath涓嬬殑nutch-site.xml浼?xì)浼樺厛鍔犺浇锛屽鏋滃湪鍦ˋpplication鐜榪愯錛屽簲鎶婂涓妌utch-site.xml鎵撳叆鍒皀utch-0.9.jar鍖呴噷錛屽惁鍒欙紝涓婇潰鐨勪竴浜涘睘鎬т負(fù)絀轟笉鑳借繍琛屻?br>

4銆佸湪Windows涓嬭繍琛孨utch錛屽緢綆鍗曪紝鍙浣犺兘鎵цCrawl榪欎釜綾誨氨琛岋紝鍐欎竴涓狝nt鑴氭湰鏀懼湪Nuthc鐨勬牴鐩綍涓嬫墽琛屽畠?yōu)O(jiān)K錛屽唴瀹瑰涓嬶細(xì)
<project name="nutch-crawl" default="crawl" basedir=".">
    
    
<property name="lib.dir"  location="lib"/>
    
<property name="conf.dir"  location="conf"/>
    

    
<path id="project.classpath">
        
<fileset dir="." includes="nutch-*.jar"/>
        
<fileset dir="lib" />
        
<pathelement path="."/>
        
<pathelement path="${conf.dir}"/>
    
</path>
    
    
    
<target name="crawl" >
        
<echo>crwaling starting</echo>
        
<property name="JVM.extra.args" value="-Xmx512m" />
        
<java classname="org.apache.nutch.crawl.Crawl" classpathref="project.classpath" fork="true">
            
<jvmarg line="${JVM.extra.args}"/>
            
<arg value="C:/dev-tools/nutch-0.9/urls"/>
            
<arg value="-dir"/>
            
<arg value="C:/dev-tools/nutch-0.9/crawl"/>
            
<arg value="-depth"/>
            
<arg value="3"/>
            
<arg value="-threads"/>
            
<arg value="15"/>
        
</java>
        
<echo>crwaling finished</echo>
    
</target>
    
</project>

鑷蟲錛屽鏃犳剰澶栵紝Nutch宸茬粡嬈㈠揩鍦拌繍琛岃搗鏉ワ紝鏈鍚庡湪crawl鐩綍涓嬩綘浼?xì)鍙戠庮C綘鎯寵鐨勪笢瑗匡紝Enjoy it!

灝忛奔 2007-04-27 11:09 鍙戣〃璇勮
]]>
主站蜘蛛池模板: 乌鲁木齐县| 梁平县| 顺昌县| 廉江市| 贵州省| 平顺县| 齐河县| 搜索| 清新县| 杭州市| 报价| 万年县| 定西市| 余干县| 渑池县| 德昌县| 保德县| 连江县| 红安县| 石棉县| 尼玛县| 皮山县| 城固县| 雅江县| 波密县| 搜索| 双牌县| 谷城县| 左云县| 平顺县| 华容县| 巴彦县| 手游| 鄂托克前旗| 海伦市| 越西县| 伊通| 宝山区| 长岭县| 安龙县| 灵寿县|