摘 要:网络爬虫是一种自动搜集互联网信息的程序,通过网络爬虫不仅能够为搜索引擎采集网络信息,而且可以作为定向信息采集器,定向采集某些网站下的特定信息,如招聘信息、租房信息等。 本文通过JAVA实现了一个基于广度优先算法的多线程爬虫程序,本论文阐述了网络爬虫实现中一些主要问题:为何使用广度优先的爬行策略,以及如何实现广度优先爬行,为何要使用多线程,以及如何实现多线程,系统实现过程中的数据存储;网页信息解析等。
关键词:网络爬虫;JAVA;多线程
Research and Design of Topic-oriented Web Spider
Abstract: SPIDER is a program which can auto collect informations from internet. SPIDER can collect data for search engines, also can be a Directional information collector, collects specifically informations from some web sites, such as HR informations, house rent informations.
In this paper, use JAVA implements a breadth-first algorithm multi-thread SPDIER. This paper expatiates some major problems of SPIDER: why to use breadth-first crawling strategy, and how to implement breadth-first crawling; why to use multi-threading, and how to implement multi-thread; data structure; HTML code parse. etc.
This SPIDER can collect URLs from one web site, and store URLs into database.
Key Words: Spider; Java; Multi-threads.
目 录