这两年疫情,公司业务越来越差,必须得准备后路了,每天睡前都会在直聘上打一遍招呼,一直到打哈欠有睡意为止...,这样持续了一周,发现很难坚持,身为一名资深蜘蛛侠,怎么能这样下去呢?于是便萌生了对BOSS下手的念头。
boss的web端功能已经挺完整了,所以直接使用无头浏览器(puppetter/playwright)应该就能搞定了,然后再整几个简单的界面,应该就差不多了。先看前端它用了哪些技术。
web框架:vue+jQuery
熟悉的全家桶

经典的$


聊天:基于websocket的mqtt实现 paho

消息传输格式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
mqtt消息分析
分析这里面的消息类型,花了不少时间找规律,通过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账号,投两种不同类型的职位,一个偏管理,一个偏技术,所以得支持多账号同时投递,理论上支持无限账号,只要电脑配置够高。
然后就是要支持多个投递计划,比如我是全栈,那么后端和前端的职位都可以投,那么就可以分两个求职计划来投递,理论上支持无限多个,但是boss每天只允许打120次招呼,所以要合理分配

在消息处理方面,目前做到了,自动接受简历投递邀请,自动接收交换联系方式,自动将各类标准消息设为已读,比如让你评价猎头,发来的职位卡片之类的。然后还添加了自动回复规则,有点类似微信公众号的自动回复设置

目前我只需要每天晚上打开我的工具,让他自动去打招呼并处理消息,只有那些真正需要认真答复的消息才会出现app的提醒里,趁午休一一回复即可!



















