2017-05-18 27 views
0

Nutchでcygwin、tomcat、nutch 1.4、solr 3.4を使用してWebクローリングのチュートリアルを行いました。私は既に一度URLをクロールすることができましたが、どういうわけか、これは何のURLを試しても、もう動作しません。 ランタイム/ローカル/ confの中に私の正規表現urlfilter.txtは以下の通りです:Nutch 1.4 with Solr 3.4 - URLをクロールできません。「取り込むURLはありません」

# skip file: ftp: and mailto: urls 
-^(file|ftp|mailto): 

# skip image and other suffixes we can't yet parse 
# for a more extensive coverage use the urlfilter-suffix plugin 
-\.(gif|GIF|jpg|JPG|png|PNG|ico|ICO|css|CSS|sit|SIT|eps|EPS|wmf|WMF|zip|ZIP|ppt|PPT|mpg|MPG|xls|XLS|gz|GZ|rpm|RPM|tgz|TGZ|mov|MOV|exe|EXE|jpeg|JPEG|bmp|BMP|js|JS)$ 

# skip URLs containing certain characters as probable queries, etc. 
-[?*[email protected]=] 

# skip URLs with slash-delimited segment that repeats 3+ times, to break loops 
-.*(/[^/]+)/[^/]+\1/[^/]+\1/ 

# accept anything else 
+^http://([a-z0-9]*\.)*nutch.apache.org/ 

ランタイム/ local/binの中の私seed.txtで唯一のURLは/ URLは唯一http://nutch.apache.org/です。

$ ./nutch crawl urls -dir newCrawl3 -solr http://localhost:8080/solr/ -depth 2 -topN 3 

私が使用するコマンドをクロールするためにコンソール出力は次のようになります。

cygpath: can't convert empty path 
crawl started in: newCrawl3 
rootUrlDir = urls 
threads = 10 
depth = 2 
solrUrl=http://localhost:8080/solr/ 
topN = 3 
Injector: starting at 2017-05-18 17:03:25 
Injector: crawlDb: newCrawl3/crawldb 
Injector: urlDir: urls 
Injector: Converting injected urls to crawl db entries. 
Injector: Merging injected urls into crawl db. 
Injector: finished at 2017-05-18 17:03:28, elapsed: 00:00:02 
Generator: starting at 2017-05-18 17:03:28 
Generator: Selecting best-scoring urls due for fetch. 
Generator: filtering: true 
Generator: normalizing: true 
Generator: topN: 3 
Generator: jobtracker is 'local', generating exactly one partition. 
Generator: 0 records selected for fetching, exiting ... 
Stopping at depth=0 - no more URLs to fetch. 
No URLs to fetch - check your seed list and URL filters. 
crawl finished: newCrawl3 

は、私はいくつかの同様の質問がある知っているが、それらのほとんどは解決されません。誰も助けることができますか?

ありがとうございます!

答えて

0

本当に本当に古いNutchバージョンを使用しているのはなぜですか?しかし、それにもかかわらず、あなたが直面している問題は、この行の先頭にスペースがある:

_+^http://([a-z0-9]*\.)*nutch.apache.org/ 

#は無視されます、\n、スペースで始まるすべての行(私はアンダースコアとスペースを強調しました)構成パーサーが次を参照してください。 https://github.com/apache/nutch/blob/master/src/plugin/lib-regex-filter/src/java/org/apache/nutch/urlfilter/api/RegexURLFilterBase.java#L258-L269

0

ディレクトリnewCrawl3を削除できます。 Nutchは最近クロールされたときに再びURLをクロールしません。

関連する問題