明永成

导航

 

2013年9月8日

摘要: Larbin是一个用C++开发的开源网络爬虫,有一定的定制选项和较高的网页抓取速度。下图表示了一般爬虫抓取网页的基本过程。抓取以/Larbin.conf中的startUrl做为种子URLs开始。下面先来看用于处理url的类:上面的类图只显示了url类可见的接口。除了基本的构造函数和私有变量的get函数,url类比较重要的函数是hashCode( ),其实现为:/* return a hashcode for this url */uinturl::hashCode () { unsigned int h=port; unsigned int i=0; while (host[i] != 0) 阅读全文
posted @ 2013-09-08 19:30 明永成 阅读(913) 评论(0) 推荐(0) 编辑