首页 > 编程语言 > 详细

R语言爬虫 rvest包 html_text()-html_nodes() 原理说明

时间:2016-07-09 20:40:11      阅读:502      评论:0      收藏:0      [点我收藏+]
library(rvest) 

  例子网页:http://search.51job.com/jobsearch/search_result.php?fromJs=1&jobarea=010000%2C00&funtype=0000&industrytype=00&keyword=%E6%95%B0%E6%8D%AE&keywordtype=2&lang=c&stype=2&postchannel=0000&fromType=1&confirmdate=9

网页源文件(部分):

 

技术分享

要爬虫的数据:职位名、公司名、薪资、工作地点、发布时间。

读入网页 

 技术分享

 

测试html_nodes():节点 p.t1  span.t2  span.t3 span.t4 span.t5技术分享

测试html_text()

技术分享

 

R语言爬虫 rvest包 html_text()-html_nodes() 原理说明

原文:http://www.cnblogs.com/by2016/p/5656450.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!