网页采集中的发布时间提取与补全机制

 2022-02-13 06:02

论文总字数:27372字

摘 要

一个网页的发布时间是一个网页正式出现在互联网上的时间,它是网页被创建、发布或者修改的时间标记。对网页信息的发布时间进行提取和补全,可以有效追踪和审查互联网信息,校验信息的真实性、可靠性;方便网络管理者进行相关的维护工作,对基于网页信息采集的大数据平台构建等具有重要意义。

本论文以网页发布时间的提取和补全为研究任务,针对不同的网站详细分析了其网站架构和网页结构,提出不同的信息提取方法;同时,对于发布时间提取失败或丢失的情况,构建相应的补全机制实现目标信息的补全。论文详细分析了论坛类和新闻类网站的特点和网页结构,通过对网页源代码的分析,定位要提取的目标信息在网页中位置。网络爬虫使用XPath语言对网页进行解析,定位网页节点并获取目标信息。论坛类网站以帖子为基本抓取单元,获取帖子的发布时间;新闻类网站则以新闻网页为基本抓取单元,获取该网页的最近更新时间和新闻的发稿时间。论坛类网站的补全机制通过对帖子前后的关联信息进行分析实现;新闻类网站补全机制的实现通过对目标网页的关联网页进行逻辑推导实现。论文以“百度贴吧”和“搜狐新闻”为实例,运用Python语言和网络爬虫框架Scrapy,对相关的方法策略进行了设计和实现,构建了一套完善的抓取和补全机制。

关键词:网络爬虫 发布时间 信息采集 补全机制 论坛 新闻

Release time crawling and completion mechanism in web page collection

ABSTRACT

The release time of a web page is the time it was released on the Internet. It is the time stamp that the page is created and released or modified. Extracting and completing the release time of web page information, can effectively track and review the Internet information, check its authenticity and reliability. It makes the related maintenance work more convenient. It has important significance to building big data platform for information collection.

The paper focus on the research of release time extraction and completion. According to the different web site analyzed the site structure and page structure in detail and put forward different information extraction method. At the same time, there is a completion mechanism to complete the release time if it capture failure or loss. The paper analyzed the web structure and characteristics of forum websites and news websites in detail. Through the analysis of the source code of the web page can locate the target information in the web site. Web crawler uses XPath language to parse web pages, locate the web node and obtain the target information. Forum websites take the post as the basic grab unit to get the post release time. News websites take the news page as the basic grab unit to get recently updated time and the press time of news. Forum websites use the related information before or after the post to complete the target information. News websites complete the target information based on the logic deduction of related pages. This paper use Baidu Tieba and Sohu News as examples, design and implement the related methods and strategies. This paper use Python language and web crawler framework Scrapy to build a perfect web information collection and completion mechanism.

Keywords: web crawler; release time; information collection; completion mechanism; forum websites; news websites

目录

摘要 I

ABSTRACT II

第一章 绪论 1

1.1 研究背景和意义 1

1.2 网络爬虫和研究现状 1

1.3 主要工作 3

第二章 网页结构分析与提取策略 4

2.1 网页分析 4

2.2.1 论坛类网站和网页结构分析 4

2.2.2 新闻类网站和网页结构分析 5

2.2 提取方法与策略 6

2.2.1 Xpath介绍 6

2.2.2 方法和策略 6

第三章 系统总体设计 8

3.1 Scrapy框架及原理介绍 8

3.2 系统框架设计 9

3.2.1 论坛类 9

3.2.2 新闻类 12

3.3 数据定义与数据库设计 14

第四章 详细设计和实现 16

4.1 软件与配置 16

4.1.1 软件版本及安装 16

4.1.2 软件配置 16

4.2 详细设计与实现 17

4.2.1 论坛类设计与实现 17

4.2.2 新闻类设计与实现 19

4.3 系统优化配置 20

第五章 总结 22

5.1 总结 22

5.2 进一步工作 23

致谢 24

参考文献 25

  1. 绪论
1.1研究背景和意义

发布时间是指一件物品诞生的时间,具体而言,是指它正式出现在公众视野中的时间。它可以是一件物品,一个网页,或是一篇帖子,一条微博……从互联网角度来说,一个网页的发布时间是这个网页正式出现在互联网上的时间,它是网页被创建、发布或者修改的时间标记,暗示着一个网页的寿命,即网页的使用时长。一篇帖子,一条微博的发布时间是指互联网用户将撰写的文本提交给网络运营商,经审核后发布到互联网上的时间。也就是说,发布时间就是信息诞生在互联网上的时间,它对互联网信息的追踪、审查、维护等工作具有重要意义。

近年来,我国互联网发展迅速,互联网规模不断扩大。互联网的技术变革,从方方面面改变了人们的生活。人们通过互联网购物、学习、娱乐和工作,在互联网上获取和分享信息,每个人都参与到了互联网的扩张之中。然而,伴随着互联网的发展和扩大,互联网的维护和管理工作越来越繁重。在以互联网为主要信息获取渠道的今天,各种虚假信息和垃圾信息充斥着人们的生活,给人们的生活带来重重困扰。

剩余内容已隐藏,请支付后下载全文,论文总字数:27372字

您需要先支付 80元 才能查看全部内容!立即支付

该课题毕业论文、开题报告、外文翻译、程序设计、图纸设计等资料可联系客服协助查找;