这两年疫情,公司业务越来越差,必须得准备后路了,每天睡前都会在直聘上打一遍招呼,一直到打哈欠有睡意为止...,这样持续了一周,发现很难坚持,身为一名资深蜘蛛侠,怎么能这样下去呢?于是便萌生了对BOSS下手的念头。
boss的web端功能已经挺完整了,所以直接使用无头浏览器(puppetter/playwright)应该就能搞定了,然后再整几个简单的界面,应该就差不多了。先看前端它用了哪些技术。
熟悉的全家桶
经典的$
关于ajax请求需要注意的是boss使用了ajax代理,如果注入代码直接拦截原生ajax请求是拿不到response的。
消息传输格式protobuf,和抖音一样,找到定义文件就能解析了
要实现自动投简历,会用到以下一些接口,安全起见完整地址就不贴了,懂得搜一下就能找到。
职位搜索joblist.json,看字段名就能猜到什么意思
{ "code": 0, "message": "Success", "zpData": { "resCount": 415, "filterString": "", "lid": "xxx", "hasMore": true, "jobList": [ { "securityId": "xxx", "bossAvatar": "xxx", "bossCert": 3, "encryptBossId": "xxx", "bossName": "xxx", "bossTitle": "渠道经理", "goldHunter": 0, "bossOnline": false, "encryptJobId": "xxx", "expectId": 0, "jobName": "需求分析工程师", "lid": "xxx", "salaryDesc": "10-15K·13薪", "jobLabels": [ "1-3年", "本科" ], "jobValidStatus": 1, "iconWord": "", "skills": [ "需求分析" ], "jobExperience": "1-3年", "daysPerWeekDesc": "", "leastMonthDesc": "", "jobDegree": "本科", "cityName": "上海", "areaDistrict": "浦东新区", "businessDistrict": "张江", "jobType": 0, "proxyJob": 0, "proxyType": 0, "anonymous": 0, "outland": 0, "optimal": 0, "iconFlagList": [], "itemId": 1, "city": xxx, "isShield": 0, "atsDirectPost": false, "encryptBrandId": "xxx", "brandName": "xxx", "brandLogo": "xxx", "brandStageName": "已上市", "brandIndustry": "计算机软件", "brandScaleName": "1000-9999人", "welfareList": [ "零食下午茶", "补充医疗保险", "通讯补贴", "五险一金", "股票期权", "带薪年假", "员工旅游", "节日福利", "定期体检", "交通补助", "餐补", "年终奖" ], "industry": 100021, "contact": false } ] } }
获取简历attachment/checkbox
{ "code": 0, "message": "Success", "zpData": { "supportVideoResume": false, "resumeList": [ { "resumeId": "xxx", "showName": "全栈开发.docx", "resumeSize": 10000, "resumeSizeDesc": "34.9KB", "suffixName": "docx", "annexType": 0, "uploadTime": "xxx", "parserId": "xxx", "syncStatus": 1, "previewType": 1, "restricted": false, "cvId": "", "securityStatus": 0, "restrictedDays": -1, "target": 0, "nlpParserType": 1 }, { "resumeId": "xxx", "showName": "资深前端.docx", "resumeSize": 12345, "resumeSizeDesc": "34.9KB", "suffixName": "docx", "annexType": 0, "uploadTime": "xxx", "parserId": "xxxx", "syncStatus": 1, "previewType": 1, "restricted": false, "cvId": "", "securityStatus": 0, "restrictedDays": -1, "target": 0, "nlpParserType": 1 } ], "videoResumeList": [], "supportAnnexType": false, "supportCommonResume": true, "showUploadBtnType": false, "complete": true, "maxCount": 3, "resumeCount": 3 } }
打招呼friend/add post form
{ "code": 0, "message": "Success", "zpData": { "showGreeting": true, "securityId": "xxx", "bossSource": 0, "source": "", "encBossId": "xxx", "greeting": "个人觉得我和贵公司这一岗位很匹配,可以聊聊么?" } }
投简历exchange/request post form
分析这里面的消息类型,花了不少时间找规律,通过type+body.type+biztype基本就能确定唯一的消息类型
{ "from": { "uid": xxx, "name": "xxx", "avatar": "xxx", "company": "xxx", "headImg": 8, "certification": 3, "source": 0 }, "to": { "uid": xxx, "name": "xxx", "avatar": "xxx", "company": "", "headImg": 0, "certification": 0, "source": 0 }, "type": 1, "mid": xxx, "time": xxx, "body": { "type": 1, "templateId": 1, "headTitle": "", "text": "好", "sound": null, "image": null, "action": null, "articles": [], "notify": null, "dialog": null, "jobDesc": null, "resume": null, "redEnvelope": null, "orderDetail": null, "hyperLink": null, "video": null, "interview": null, "jobShare": null, "resumeShare": null, "atInfo": null, "sticker": null, "chatShare": null, "interviewShare": null, "listCard": null, "starRate": null, "frame": null, "multiImage": null, "extend": "" }, "offline": false, "received": false, "pushText": "xxx", "taskId": 0, "cmid": xxx, "status": 0, "uncount": 0, "pushSound": 0, "flag": xxx, "encryptedBody": null, "bizId": null, "bizType": null, "securityId": "xxx", "isPresenceMsg": false, "isSelf": false }
下面是成品的效果
点击“添加账号”按钮
用boss直聘app扫码登录账号
出现boss账号头像代表登录成功
点击“求职计划”,然后点击右上角的“+”按钮
设置求职条件
注意事项:
点击“保存”按钮后,出现提示框,点击“开始”
接下来工具就会按顺序向符合条件的所有职位的boss打招呼和自动投简历了。
所有打过招呼的职位都会在列表里显示
本工具已将部分规范消息做了自动处理,比如简历投递邀请、交换联系方式请求等,而且会将其设置为已读,也就不会再出现在app的提醒里。但是有些非标准的消息,例如:“你做过XXX类项目吗”,这类消息你可以在app上手工回复,也可以在工具里为其配置自动回复规则,尽可能减少你的人工操作。可按下面的方式配置自动回复规则,点击“配置”按钮
点击“添加”按钮
填写规则
规则填写说明:
比如我要匹配消息内容中包含“简历”两个字的,然后执行自动发简历的操作,那么如下配置即可
点击“确定”,再点击“保存”。
多个关键字匹配有两种方式:
下面是一些常用回复规则供参考
左侧的上下箭头按钮用于调整优先级,每条消息都会按顺序从上到下匹配你设置好的规则,一旦完成匹配,就不会再匹配后面的规则。匹配不上的将会在app内提醒,你再手工回复。
目前我只需要每天晚上打开我的工具,让他自动去打招呼并处理消息,只有那些真正需要认真答复的消息才会出现app的提醒里,趁午休一一回复即可!