在分布式(部署)模式下进行 Nutch 爬网后如下:
bin/nutch crawl s3n://..... -depth 10 -topN 50000 -dir /crawl -threads 20
我需要以地图缩减友好格式提取每个获取的 URL 及其内容。通过使用下面的 readseg 命令,可以获取内容,但输出格式不适合映射缩减。
bin/nutch readseg -dump /crawl/segments/* /output -nogenerate -noparse -noparsedata -noparsetext
理想情况下,输出应采用以下格式:
http://abc.com/1 content of http://abc.com/1
http://abc.com/2 content of http://abc.com/2
关于如何实现这一目标的任何建议?