自写用Easyclick快手全分辨率滑块验证源码!

function 联众打码() {
    var 联众账号 = readConfigString("联众账号");
    logd("联众账号: " + 联众账号);
    var 账号=string.trim(联众账号)
    var 联众密码 = readConfigString("联众密码");
    logd("联众密码: " + 联众密码);
    var 密码=string.trim(联众密码)
    var request = image.requestScreenCapture(10000, 0);
    if (!request) {
        request = image.requestScreenCapture(10000, 0);
    }
    logd("申请截图结果... " + request)
    var 截屏
    sleep(1000)
    let node = id("slideBg").getOneNodeInfo(1000)
    if (node) {
        logd("找到节点")
        var d = image.captureScreenBitmap("jpg",
            node.bounds.left,
            node.bounds.top,
            node.bounds.right,
            node.bounds.bottom, 90);
        if (d) {
            var ds = image.bitmapBase64(d, 'jpg', 100);
            var urls = "https://v2-api.jsdama.com/upload";
            var data = {
                softwareId: '17983',
                username: 账号,
                password: 密码,
                softwareSecret: 'YDHBhrLQ7Mcintji72488hfxuBnN6MhN4KbYlouV',
                captchaData: ds,
                captchaType: '1310',
                captchaMinLength: '2',
                captchaMaxLength: '2',
                workerTipsId: ''
            }
            var 返回结果 = http.postJSON(urls, data, 20 * 1000, null)
            if (返回结果 != "" && 返回结果 != null) {
                logd(返回结果)
                var jsonstr = JSON.parse(返回结果)
                if (jsonstr.code == 0) {
                    logd('返回结果成功' + JSON.stringify(jsonstr.data));
                    var 结果 = jsonstr.data;
                    logd('结果坐标--->' + 结果.recognition)

                    let reg = /([0-9]+),([0-9]+)\|([0-9]+),([0-9]+)/
                    let arr = reg.exec(结果.recognition)
                    swipeToPoint(
                        node.bounds.left + parseInt(arr[1]),
                        node.bounds.top + parseInt(arr[2]),
                        node.bounds.left + parseInt(arr[3]),
                        node.bounds.top + parseInt(arr[2]),
                        1000)
                    ;
                    sleep(1000)
                    logd("滑动成功")

                    sleep(1000)
                }

            } else {
                logd('打印失败')
                return false
            }
        }
        image.recycle(d)
    }

}

你可能感兴趣的:(html5,javascript,微信,python)