基于Python Scrapy实现的腾讯tecent招聘职位数据爬取爬虫系统 含结果数据集和全部源代码

上传者: 27595745 | 上传时间: 2021-07-10 17:02:45 | 文件大小: 15KB | 文件类型: RAR
基于Python Scrapy实现的腾讯招聘职位数据爬取爬虫系统 含结果数据集和全部源代码 # -*- coding: utf-8 -*- import scrapy from Tencent.items import TencentItem class TencentpostionSpider(scrapy.Spider): name = 'tencentPosition' allowed_domains = ['tencent.com'] url = "http://hr.tencent.com/position.php?&start=" offset = 0 # 起始url start_urls = [url + str(offset)] def parse(self, response): for each in response.xpath("//tr[@class='even'] | //tr[@class='odd']"): # 初始化模型对象 item = TencentItem() # 职位名称 item['positionname'] = each.xpath("./td[1]/a/text()").extract()[0] # 详情连接 item['positionlink'] = each.xpath("./td[1]/a/@href").extract()[0] # 职位类别 item['positionType'] = each.xpath("./td[2]/text()").extract()[0] # 招聘人数 item['peopleNum'] = each.xpath("./td[3]/text()").extract()[0] # 工作地点 item['workLocation'] = each.xpath("./td[4]/text()").extract()[0] # 发布时间 item['publishTime'] = each.xpath("./td[5]/text()").extract()[0] yield item if self.offset < 1680: self.offset += 10 # 每次处理完一页的数据之后,重新发送下一页页面请求 # self.offset自增10,同时拼接为新的url,并调用回调函数self.parse处理Response yield scrapy.Request(self.url + str(self.offset), callback=self.parse)

文件下载

资源详情

[{"title":"( 23 个子文件 15KB ) 基于Python Scrapy实现的腾讯tecent招聘职位数据爬取爬虫系统 含结果数据集和全部源代码","children":[{"title":"Tencent","children":[{"title":"scrapy.cfg <span style='color:#111;'> 257B </span>","children":null,"spread":false},{"title":"Tencent","children":[{"title":"settings.py <span style='color:#111;'> 3.25KB </span>","children":null,"spread":false},{"title":"__init__.pyc <span style='color:#111;'> 137B </span>","children":null,"spread":false},{"title":"pipelines.py <span style='color:#111;'> 557B </span>","children":null,"spread":false},{"title":"tencent.json <span style='color:#111;'> 22.45KB </span>","children":null,"spread":false},{"title":"middlewares.py <span style='color:#111;'> 3.51KB </span>","children":null,"spread":false},{"title":"main.py <span style='color:#111;'> 260B </span>","children":null,"spread":false},{"title":"items.pyc <span style='color:#111;'> 565B </span>","children":null,"spread":false},{"title":"__init__.py <span style='color:#111;'> 0B </span>","children":null,"spread":false},{"title":"pipelines.pyc <span style='color:#111;'> 1.15KB </span>","children":null,"spread":false},{"title":"items.py <span style='color:#111;'> 476B </span>","children":null,"spread":false},{"title":"spiders","children":[{"title":"__init__.pyc <span style='color:#111;'> 145B </span>","children":null,"spread":false},{"title":"__init__.py <span style='color:#111;'> 161B </span>","children":null,"spread":false},{"title":"tencentPosition.py <span style='color:#111;'> 1.25KB </span>","children":null,"spread":false},{"title":"tencentPosition.pyc <span style='color:#111;'> 1.51KB </span>","children":null,"spread":false}],"spread":true},{"title":"settings.pyc <span style='color:#111;'> 578B </span>","children":null,"spread":false}],"spread":false},{"title":".idea","children":[{"title":"misc.xml <span style='color:#111;'> 1.44KB </span>","children":null,"spread":false},{"title":"Tencent.iml <span style='color:#111;'> 284B </span>","children":null,"spread":false},{"title":"workspace.xml <span style='color:#111;'> 28.07KB </span>","children":null,"spread":false},{"title":"dictionaries","children":[{"title":"nesta.xml <span style='color:#111;'> 86B </span>","children":null,"spread":false}],"spread":true},{"title":".name <span style='color:#111;'> 7B </span>","children":null,"spread":false},{"title":"modules.xml <span style='color:#111;'> 266B </span>","children":null,"spread":false},{"title":"vcs.xml <span style='color:#111;'> 164B </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}]

评论信息

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明