一个帅气的boy,你可以叫我Love And Program
⌨个人主页:Love And Program的个人主页
如果对你有帮助的话希望三连支持一下博主
目标网站:'https://vapi.51job.com/job.php?apiversion=400&module=jobinfo&clientid=000005'
import requests
headers = {
'Accept':' application / json, text / javascript, * / *; q = 0.01',
'Host': 'vapi.51job.com',
'Origin': 'https://jobs.51job.com',
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.60 Safari/537.36'
}
url = 'https://vapi.51job.com/job.php?apiversion=400&module=jobinfo&clientid=000005'
r = requests.post(url, headers=headers, timeout=100)
# 编码这边gbk、utf-8选择使用
r.encoding = 'gbk'
print(r.text)
第一次尝试!爬取成功!出现字段(包含全部有用信息):
'{"status":"1","message":"成功","resultbody":{"jobid":"137476164","ctmid":"5602782","coid":"6540395","divid":"0","cjobname":"高级算法工程师","ejobname":"高级算法工程师","cocname":"安徽高哲信息技术有限公司","coename":"安徽高哲信息技术有限公司","issuedate":"2022-08-24 10:52:14","jobarea":"150200","jobareaname":"合肥-高新区","jobnum":"","providesalary":"1.5-3万","sexname":"不限","agefrom":"0","ageto":"0","workyear":"3-4年","workyear_origin":"5","degreefrom":"硕士","companytype":"民营公司","companysize":"50-150人","cjobinfo":"岗位职责:
1、根据产品及项目需求,调研新的模式识别技术和方案,制定相应的算法解决方案;
2、实验与开发相应的算法模型,并将实验模型工业化;
3、根据业务需求,不断优化算法效率和准确度,以持续优化产品;
4、跟踪和引入行业前沿技术,提升团队整体技术水平,维持公司技术和产品的市场领先性。
任职资格:
1、图像处理、模式识别、微波成像或电子信息类专业,***硕士及以上学历,三年以上
图像算法工作经验;
2、熟悉传统的图像处理(图像增强,分割,预处理),熟练使用opencv等开源库;
3、熟练使用caffe或者其他深度学习框架、了解深度学习从rcnn~ssd的进化脉络;
4、精通python,c\\/c++编程语言;有良好的编码习惯和风格;熟悉Linux开发环境;
5、具备中英文学术论文的调研和复现能力,熟悉前沿技术发展,可统筹规划算法解决方案。","ejobinfo":"岗位职责:
1、根据产品及项目需求,调研新的模式识别技术和方案,制定相应的算法解决方案;
2、实验与开发相应的算法模型,并将实验模型工业化;
3、根据业务需求,不断优化算法效率和准确度,以持续优化产品;
4、跟踪和引入行业前沿技术,提升团队整体技术水平,维持公司技术和产品的市场领先性。
任职资格:
1、图像处理、模式识别、微波成像或电子信息类专业,***硕士及以上学历,三年以上
图像算法工作经验;
2、熟悉传统的图像处理(图像增强,分割,预处理),熟练使用opencv等开源库;
3、熟练使用caffe或者其他深度学习框架、了解深度学习从rcnn~ssd的进化脉络;
4、精通python,c\\/c++编程语言;有良好的编码习惯和风格;熟悉Linux开发环境;
5、具备中英文学术论文的调研和复现能力,熟悉前沿技术发展,可统筹规划算法解决方案。","workarea":"150208","workareaname":"合肥-高新区","address":"创新产业园G3栋A座三楼","jkeyword":"图像处理 算法 人工智能 机器学习 深度学习","jobwelf":"五险一金 年终奖金 周末双休 绩效奖金 免费班车 股票期权","effect":"1","lon":"117.144552","lat":"31.838057","famousname":"","famousindustry":"","famouslogo":"","famousid":"0","hr":{"hruid":"17457435","ctmid":"5602782","coid":"","divid":"","name":"钟玉玲","sex":"1","position":"","chatposition":"人事","nickname":"安徽高哲","bigportrait":"18\\/17458\\/17457435\\/0f1b466f3230691baf60aa363de1bec0_big.gif?1644288229","smallportrait":"18\\/17458\\/17457435\\/0f1b466f3230691baf60aa363de1bec0_small.gif?1644288229","updatedate":"2022-06-16 10:12:59","lasttime":"1661327465","lasttimestr":"6小时前活跃","isinterviewer":"0","bigportraiturl":"http:\\/\\/img01.51jobcdn.com\\/imehire\\/userportrait\\/18\\/17458\\/17457435\\/0f1b466f3230691baf60aa363de1bec0_big.gif?1644288229","smallportraiturl":"http:\\/\\/img01.51jobcdn.com\\/imehire\\/userportrait\\/18\\/17458\\/17457435\\/0f1b466f3230691baf60aa363de1bec0_small.gif?1644288229","chatIntention":"经常聊天","activePeriod":"全天活跃","rsmOptTag":"简历处理敏捷"},"defaultportraiturl":"\\/\\/img01.51jobcdn.com\\/im\\/jobs\\/man.png","functype1":"7309","functype2":"","indtype":"计算机硬件","funtype":"算法工程师","language":"","major":"","logourl":"\\/\\/img04.51jobcdn.com\\/fansImg\\/CompLogo\\/7\\/6541\\/6540395\\/6540395_300.png?637564105485874723","dibiao":"","isapply":"0"}}'
刚进界面出现滑块滑动解锁,解锁完后发现在使用上述代码不能使用,开始逆向爬取信息,根据错误发现签名不正确 -> 推断sign缺失,打开载荷:
加入data
,sign
参数,先选中sign在查找中搜搜碰碰运气:
运气不错,第一个就找到了,双击定位,发现不是变化的sign
,可以直接复制到datas
中,读者可以用xpath
直接选择位置以便在类似网页使用:
datas={'data':'{"jobid":"137476164","usertoken":"26cb948bad8baab3e3629d23fcb280e862133a5d","hr":true}',
'sign':'55fc8a694549e5037873e9e389cfb95d'}
r = requests.post(url, headers=headers, timeout=100)
import requests
headers = {
'Accept':' application / json, text / javascript, * / *; q = 0.01',
'Host': 'vapi.51job.com',
'Origin': 'https://jobs.51job.com',
'Referer':'https://jobs.51job.com/',
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.60 Safari/537.36'
}
url = 'https://vapi.51job.com/job.php?apiversion=400&module=jobinfo&clientid=000005'
datas={'data':'{"jobid":"137476164","usertoken":"26cb948bad8baab3e3629d23fcb280e862133a5d","hr":true}',
'sign':'55fc8a694549e5037873e9e389cfb95d'}
r = requests.post(url, headers=headers, timeout=100)
仅供学习参考