网络爬虫的设计与实现

2014-07-28 18:40:08董日壮郭曙超
电脑知识与技术 2014年17期
关键词:搜索引擎

董日壮 郭曙超

摘要:随着社会的飞速发展,互联网上信息容量急剧增加,人们对搜索引擎的依赖愈发强烈。网络爬虫是搜索引擎的关键技术之一,同时也是快速获取网络上可用资源的有效工具。为了能够对网络爬虫更深入的了解并熟练合理的应用于各种的应用和系统中,经过对网络爬虫的框架、基本工作流程、抓取策略的分析和了解,使用Java与HTML解析工具jsoup以及MySQL数据库实现一个网络爬虫,简单爬取京东的图书数据,用于用户喜好的分析及购买倾向的判断,为用户提供个性化的服务。

关键词:搜索引擎;网络爬虫;抓取策略;Java;jsoup;MySQL

中图分类号:TP391 文献标识码:A 文章编号:1009-3044(2014)17-3986-03

Design and Implementation of Web Crawler

DONG Ri-zhuang1, GUO Shu-chao2

(1.School of Computer Engineering, Qingdao Technological University, Qingdao 266033, China; 2.Shandong Entry-Exit Inspection and Quarantine Bureau, Qingdao 266000, China)

Abstract: With the rapid development of society, a sharp increase in information capacity on the Internet, people rely on search engines is growing. As one of the key technologies of Web crawler search engines, but also an effective tool for quick access to the available resources on the network. In order to understand web crawler better and apply it into various applications and systems more skillful and reasonably. After analyze and understand the framework, basic workflow, grab strategy of web crawler, use programming language of Java and HTML parsing tools jsoup and MySQL database implements a web crawler, crawling Jingdong book data simply in order to analysis users preferences and purchase predisposition, so that to provide users with personalized service.

Key words: search engine; Web crawler; grab analyze; Java; jsoup; MySQL

1 概述

随着社会发展与时代进步,信息社会的发展速度超出了绝大多数人的想象,与此同时,互联网容量已经达到了一个空前的规模。据搜索引擎巨头Google透露,在2012年时候,Google的网页爬虫Googlebot每天都会经过大约200亿个网页[1],并且追踪着约300亿个独立的URL链接。此外,Google每个月的搜索请求接近1000亿次。由此可以看出,互联网信息量庞大,搜索引擎应用广泛。但是海量的信息要求搜索引擎给出更快的反馈。

网络爬虫[2,3,4](Web Crawler)作为搜索引擎的重要组成部分,同样也需要更快的发展,以应对迅速增长的互联网容量。网络爬虫通常又被称作网络蜘蛛[5](Web Spider),是一个可以自动在互联网上漫游并可以自动下载网页的程序或脚本。由于其功能多样,网络爬虫可以被用于多种场合中,比如微博上有众多的用户与其他用户之间的联系的信息;……

登录APP查看全文

猜你喜欢
搜索引擎
Chrome 99 Canary恢复可移除预置搜索引擎选项
网络搜索引擎亟待规范
中国卫生(2015年12期)2015-11-10 05:13:38
Nutch搜索引擎在网络舆情管控中的应用
警察技术(2015年3期)2015-02-27 15:37:09
广告主与搜索引擎的双向博弈分析
基于Lucene搜索引擎的研究
知识漫画
百科知识(2012年11期)2012-04-29 08:30:15
一种自反馈式元搜索系统的设计
搜索引擎,不止有百度与谷歌
搜索,也要“深搜熟滤”
浅析搜索引擎的原理及发展前景
大众科技(2005年5期)2005-04-29 00:44:03