毕业论文

打赏
当前位置: 毕业论文 > 计算机论文 >

python+mysql网络爬虫定向爬取文本信息+源代码

时间:2019-08-18 20:17来源:毕业论文
网络爬虫的主程序是用python编程语言编写的,使用python中的Scrapy框架能够简化开发,同时在爬虫程序中实现多线程来优化爬虫的爬取速度。使用广度优先的搜索策略可以尽可能的在目标

摘要:一般的搜索引擎搜索到的内容广泛而杂乱,大大的降低了用户得到有效信息的效率。为了解决这个问题,本课题设计了一个定向的网络爬虫,它可以根据用户的特定需求来爬取网站内的信息。网络爬虫的主程序是用python编程语言编写的,使用python中的Scrapy框架能够简化开发,同时在爬虫程序中实现多线程来优化爬虫的爬取速度。使用广度优先的搜索策略可以尽可能的在目标网站全面的爬取信息,然后将提取到的有效的信息存储到数据库中,mysql数据库是开源免费的数据库且功能强大,是最佳的选择。为了方便日后的使用,最后将数据库中的数据输出到本地文本文档中进行整合。38812
毕业论文关键词:网络爬虫;python;数据库;PyCharm
Web crawler directional crawling text information
Abstract:General search engines search for the content featuring too wide and miscellaneous, reducing the efficiency for the user to get effective information.In order to solve this problem, this topic designes a targeted web spider,which can cater to the specific needs of users to gain the information within the website.The web spider's main program is written in python, of which  the Skrapy framework can simplify the process of development.Meanwhile, multithreading is implemented to optimize the speed of getting information.Applying searching strategies oriented in the scale of information can find as much as possible information on the targeted website ,and then we can store the extracted valid information into the database.Among all the categories,mysql stands out as the best option for its free access and powerful functions.In order to facilitate the future use , the data in the database should be output to the local text document for integration.
Key words: web crawler;. python;database;PyCharm
目  录

摘要3
关键词3
Abstract3
Key words3
引言(或绪论)3
1系统的开发环境及技术简介4
1.1系统开发环境4
1.1.1 Pycharm4
1.1.2数据库简介4
1.1.3WebStrom4
1.2系统开发的思想与技术4
1.2.1定向网络爬虫4
1.2.2Scrapy框架4
1.2.3网页搜索策略5
2系统总体设计5
2.1网络爬虫的模型分析5
2.2网络爬虫搜索策略6
2.3网络爬虫的主题相关度判断7
2.4网络爬虫的概要设计7
3系统详细设计与实现 9
3.1网络爬虫总体设计9
3.2网络爬虫具体设计9
3.2.1用Scrapy框架创建一个项目9
3.2.2编写爬虫主程序9
3.2.3编写items类10
3.2.4数据的存储11
3.2.5代理设置11
3.2.6启动爬虫12
3.2.7整体流程12
4测试13
5总结14
致谢14
参考文献15
网络爬虫定向爬取文本信息
引言
近二十年,计算机在我国发展十分迅速,基本每家都有,人们用的最多的就是其搜索功能。在这个大数据时代,我们想要有效利用大量的信息资源,需要搜索引擎的帮助。百度是我国目前最出名的一个搜索引擎,我们可以通过百度查阅到很多的资料,这对生活的改变是很大的,人们不用为了解答一个疑惑而去翻阅大量的图书,只需在搜索引擎中输入关键字即可查到想要的东西。但是有的时候我们想要的东西未必可以查到或者查到的信息太多难以筛选,这也是搜索引擎存在的问题。
那么怎么解决这个问题呢?这就要用到定向网络爬虫了,它可以通过不同的正则表达式来契合用户的不同需求,这样就可以有目的的在目标网站上爬取有效的信息。在本项目中,用python来编写爬虫程序,使用了Scrapy框架,使得开发变得简易。数据存储到mysql数据库中,mysql数据库的特点是速度快,成本低。最后导出到本地文档以便日后使用。 python+mysql网络爬虫定向爬取文本信息+源代码:http://www.youerw.com/jisuanji/lunwen_37896.html
------分隔线----------------------------
推荐内容