基于Scrapy框架的網(wǎng)絡(luò)爬蟲實現(xiàn)與數(shù)據(jù)抓取分析
本文選題:爬蟲 切入點:Scrapy 出處:《吉林大學》2017年碩士論文 論文類型:學位論文
【摘要】:隨著信息時代的發(fā)展和編程技術(shù)的普及,搜索引擎成為了人們?nèi)粘I钪械谋仨毱。搜索引擎大多使用爬蟲技術(shù)作為核心模塊,通過關(guān)鍵詞返回用戶查詢的結(jié)果。但是網(wǎng)絡(luò)信息呈現(xiàn)爆炸式的增長,使得信息的查找和定位也變得困難。針對上述問題,本文以Python和Scrapy環(huán)境為基礎(chǔ),以“新浪微博”為爬取對象,在學習并分析當前爬蟲技術(shù)的原理、核心模塊以及運行流程的基礎(chǔ)上,探索性地實現(xiàn)一個基于Scrapy框架的網(wǎng)絡(luò)爬蟲,完成數(shù)據(jù)抓取等目標。首先,本文簡明給出了爬蟲技術(shù)的原理和發(fā)展現(xiàn)狀,介紹爬蟲工程中一些關(guān)鍵技術(shù),并著重介紹了在本研究中有深刻影響的Cookie和Robot協(xié)議。其次,通過使用基于Python語言開發(fā)的Scrapy開源爬蟲框架來進行爬蟲開發(fā),指出了Mongo DB為代表的No Sql數(shù)據(jù)庫在元數(shù)據(jù)存儲中的巨大作用。詳細介紹了Scrapy開發(fā)爬蟲的流程和實現(xiàn)細節(jié)。再次,討論了對于爬蟲設(shè)計領(lǐng)域的關(guān)鍵問題,本文實現(xiàn)的自定義爬蟲的解決方法。采用了更換Cookie和user-agent欺騙來突破站點限制。而URL去重和多線程并發(fā)的問題,則采用并分析Scrapy自帶的解決方案。最后對爬蟲進行測試并展示成果,思考存在的問題和改進的可能。
[Abstract]:With the development of information age and the popularization of programming technology, search engine has become a necessity in people's daily life. Most search engines use crawler technology as the core module. The result of user query is returned by key words. However, the explosive growth of network information makes it difficult to find and locate information. In view of the above problems, this paper is based on Python and Scrapy environment. Taking "Sina Weibo" as the object of crawling, on the basis of studying and analyzing the principle, core module and running flow of current crawler technology, this paper explores the realization of a web crawler based on Scrapy framework and accomplishes the goal of data capture. This paper briefly introduces the principle and development of crawler technology, introduces some key technologies in reptile engineering, and emphatically introduces the Cookie and Robot protocols which have profound influence in this research. By using Scrapy open source crawler framework based on Python language to develop crawlers, this paper points out the great role of No Sql database represented by Mongo DB in metadata storage, and introduces in detail the process and implementation details of Scrapy crawler development. This paper discusses the key problems in the domain of crawler design, and the solution of custom crawler in this paper. The replacement of Cookie and user-agent spoofing is used to break through the limit of site, while the problem of URL deduplication and multithreading concurrency is discussed. Finally, we test the reptiles and show the results, think about the existing problems and the possibility of improvement.
【學位授予單位】:吉林大學
【學位級別】:碩士
【學位授予年份】:2017
【分類號】:TP391.3
【相似文獻】
相關(guān)期刊論文 前10條
1 尹江;尹治本;黃洪;;網(wǎng)絡(luò)爬蟲效率瓶頸的分析與解決方案[J];計算機應(yīng)用;2008年05期
2 戚欣;;基于本體的主題網(wǎng)絡(luò)爬蟲設(shè)計[J];武漢理工大學學報;2009年03期
3 彭軻;廖聞劍;;基于瀏覽器服務(wù)的網(wǎng)絡(luò)爬蟲[J];硅谷;2009年04期
4 王江紅;朱麗君;李彩虹;;一種新型網(wǎng)絡(luò)爬蟲的設(shè)計與實現(xiàn)[J];微計算機信息;2010年03期
5 孫立偉;何國輝;吳禮發(fā);;網(wǎng)絡(luò)爬蟲技術(shù)的研究[J];電腦知識與技術(shù);2010年15期
6 楊靖韜;陳會果;;對網(wǎng)絡(luò)爬蟲技術(shù)的研究[J];科技創(chuàng)業(yè)月刊;2010年10期
7 于成龍;于洪波;;網(wǎng)絡(luò)爬蟲技術(shù)研究[J];東莞理工學院學報;2011年03期
8 李志義;;網(wǎng)絡(luò)爬蟲的優(yōu)化策略探略[J];現(xiàn)代情報;2011年10期
9 焦賽美;;網(wǎng)絡(luò)爬蟲技術(shù)的研究[J];瓊州學院學報;2011年05期
10 宋海洋;劉曉然;錢?;;一種新的主題網(wǎng)絡(luò)爬蟲爬行策略[J];計算機應(yīng)用與軟件;2011年11期
相關(guān)會議論文 前4條
1 夏詔杰;郭力;李曉霞;;化學主題網(wǎng)絡(luò)爬蟲的研究[A];第十屆全國計算(機)化學學術(shù)會議論文摘要集[C];2009年
2 李楠;谷利澤;鈕心忻;;用于XSS掃描的網(wǎng)絡(luò)爬蟲的設(shè)計與實現(xiàn)[A];2010年全國通信安全學術(shù)會議論文集[C];2010年
3 張軍;于浩;內(nèi)野寬治;;UGC中產(chǎn)品評論信息的挖掘[A];內(nèi)容計算的研究與應(yīng)用前沿——第九屆全國計算語言學學術(shù)會議論文集[C];2007年
4 徐劍;柯貴明;;網(wǎng)絡(luò)爬蟲技術(shù)在搜索引擎中的應(yīng)用[A];全國第21屆計算機技術(shù)與應(yīng)用學術(shù)會議(CACIS·2010)暨全國第2屆安全關(guān)鍵技術(shù)與應(yīng)用學術(shù)會議論文集[C];2010年
相關(guān)碩士學位論文 前10條
1 陶俊文;基于Heritrix框架的專業(yè)鎮(zhèn)信息網(wǎng)絡(luò)爬蟲系統(tǒng)[D];華南理工大學;2015年
2 馬漢超;基于主題網(wǎng)絡(luò)爬蟲的汽車行業(yè)多元信息web系統(tǒng)設(shè)計與實現(xiàn)[D];西南交通大學;2015年
3 李威;基于交通流量圖的交通信息提取技術(shù)研究[D];長安大學;2015年
4 朱嶸良;分布式并行環(huán)境下的網(wǎng)絡(luò)爬蟲研究[D];中央民族大學;2015年
5 周思華;股票系統(tǒng)之熱門話題發(fā)現(xiàn)子系統(tǒng)的設(shè)計與實現(xiàn)[D];哈爾濱工業(yè)大學;2015年
6 丁杰;基于網(wǎng)絡(luò)爬蟲的虛假網(wǎng)頁主動智能檢測[D];華北電力大學;2015年
7 唐華棟;網(wǎng)頁防抓取系統(tǒng)的設(shè)計與實現(xiàn)[D];哈爾濱工業(yè)大學;2015年
8 白劍飛;基于層次主題模型的網(wǎng)絡(luò)新聞匯聚[D];浙江大學;2015年
9 袁野;企業(yè)內(nèi)網(wǎng)搜索引擎關(guān)鍵技術(shù)研究與實現(xiàn)[D];電子科技大學;2014年
10 滕以芳;基于本體的多媒體素材網(wǎng)絡(luò)爬蟲設(shè)計與實現(xiàn)[D];吉林大學;2015年
,本文編號:1612628
本文鏈接:http://sikaile.net/kejilunwen/sousuoyinqinglunwen/1612628.html