锘??xml version="1.0" encoding="utf-8" standalone="yes"?>欧美日韩二区三区,一区二区中文视频,国产精品一区二区3区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,鍐呭濡傦細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錛屽唴瀹瑰涓嬶細
<?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浼氫紭鍏堝姞杞斤紝濡傛灉鍦ㄥ湪Application鐜榪愯錛屽簲鎶婂涓妌utch-site.xml鎵撳叆鍒皀utch-0.9.jar鍖呴噷錛屽惁鍒欙紝涓婇潰鐨勪竴浜涘睘鎬т負絀轟笉鑳借繍琛屻?br>

4銆佸湪Windows涓嬭繍琛孨utch錛屽緢綆鍗曪紝鍙浣犺兘鎵цCrawl榪欎釜綾誨氨琛岋紝鍐欎竴涓狝nt鑴氭湰鏀懼湪Nuthc鐨勬牴鐩綍涓嬫墽琛屽畠灝監K錛屽唴瀹瑰涓嬶細
<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鐩綍涓嬩綘浼氬彂鐜頒綘鎯寵鐨勪笢瑗匡紝Enjoy it!

灝忛奔 2007-04-27 11:09 鍙戣〃璇勮
]]>
主站蜘蛛池模板: 河源市| 垦利县| 永清县| 砚山县| 威远县| 博罗县| 溧阳市| 永兴县| 介休市| 日照市| 温泉县| 富锦市| 云霄县| 将乐县| 禹城市| 德州市| 鹤庆县| 阿坝县| 陆川县| 政和县| 阿巴嘎旗| 延庆县| 琼中| 江津市| 苍南县| 油尖旺区| 平塘县| 泗水县| 中宁县| 上杭县| 临泽县| 闽清县| 榆林市| 土默特左旗| 谷城县| 洛扎县| 襄垣县| 屏南县| 长葛市| 广安市| 潼南县|