最近几年刷短视频比较火爆,尤其是快手、抖音之类的上市公司,大多数都是通过手工来刷视频获取,会浪费大家很多时间,今天我来使用一个完全不同的方法,不编程直接通过配置参数来实现刷视频,实现步骤如下:
进入冰狐智能辅助在网页端「移动端」/「自动构建脚本」中新建一个“构建”。
通过元数据可以直接复制一个完全一样的构建。在上一步创建的构建右边点击“元数据”按钮,将如下元数据拷贝进入并保存,此时系统会根据元数据自动完成模块参数配置。
{
"type": "root",
"children": [{
"type": "declareVar",
"var": [{
"name": "ret",
"type": "normal",
"initType": "null",
"initValue": "null"
}, {
"name": "view",
"type": "normal",
"initType": "null",
"initValue": "null"
}, {
"name": "viewContainer",
"type": "normal",
"initType": "null",
"initValue": "null"
}, {
"name": "item",
"type": "normal",
"initType": "null",
"initValue": "null"
}]
}, {
"type": "enterApp",
"desc": "进入APP",
"debug": true,
"packageName": "com.kuaishou.nebula",
"findTag": "id:com.kuaishou.nebula:id/redFloat-",
"autoInstall": false,
"autoUpdate": false,
"wait": "1000",
"failed": "exitPopup",
"maxStep": "30",
"children": [{
"type": "clickAndEnter",
"desc": "点击进入任务页面",
"class": 1,
"debug": true,
"clickTag": "id:com.kuaishou.nebula:id/left_btn-",
"checkTag": "txt:去赚钱-",
"root": "",
"mode": "2",
"failed": "exitTaskPopupWithAD",
"descendant": [],
"duration": "500",
"maxStep": "8",
"beforeWait": "0",
"afterWait": "0",
"children": [{
"type": "clickAndEnter",
"desc": "点击进入页面",
"class": "1",
"debug": true,
"clickTag": "txt:去赚钱-",
"checkTag": "txt:任务中心|txt:日常任务-",
"root": "",
"mode": "1",
"failed": "exitTaskPopupWithAD",
"descendant": [],
"duration": "500",
"maxStep": "20",
"beforeWait": "0",
"afterWait": "3000",
"children": [{
"type": "searchAndLoopDeal",
"desc": "搜索控件并循环处理",
"debug": true,
"root": "",
"retryCount": "1",
"failed": "exitTaskPopupWithAD",
"duration": "500",
"maxStep": "8",
"beforeWait": "0",
"afterWait": "0",
"dealItems": [{
"key": "txt:去签到-$&1",
"value": {
"type": "click",
"desc": "点击控件",
"class": "2",
"debug": true,
"mode": "2",
"random": true,
"descendant": [],
"beforeWait": "0",
"afterWait": "2000",
"target": "view"
}
}, {
"key": "txt:福利-$&2",
"value": {
"type": "click",
"desc": "金币悬赏",
"class": "2",
"debug": true,
"mode": "2",
"random": true,
"descendant": [],
"beforeWait": "0",
"afterWait": "1000",
"target": "view"
}
}, {
"key": "txt:领福利-$&2",
"value": {
"type": "clickAndEnter",
"desc": "看直播",
"class": "2",
"debug": true,
"checkTag": "txt:更多直播|txt^:说点什么-",
"mode": "2",
"failed": "exitTaskPopupWithAD",
"descendant": [],
"duration": "500",
"maxStep": "5",
"beforeWait": "0",
"afterWait": "8000",
"target": "view",
"children": [{
"type": "loop",
"desc": "循环处理",
"class": 1,
"debug": true,
"minRunTime": "1.5",
"maxRunTime": "1.5",
"children": [{
"type": "findView",
"desc": "查找控件",
"debug": true,
"root": "",
"false": {
"type": "break",
"desc": "跳出循环"
},
"failed": "",
"duration": "500",
"maxStep": "8",
"beforeWait": "0",
"afterWait": "0",
"dealItems": [{
"key": "id:com.kuaishou.nebula:id/award_count_down_group-",
"value": {
"type": "sleep",
"desc": "延时",
"debug": false,
"minTime": "1000",
"maxTime": "1000"
}
}]
}]
}, {
"type": "back2Page",
"desc": "返回页面",
"debug": false,
"tag": "txt:任务中心|txt:我的金币-",
"root": "",
"backFirst": "true",
"failed": "exitTaskPopupWithAD",
"duration": "500",
"maxStep": "5",
"beforeWait": "0",
"afterWait": "0"
}]
}
}, {
"key": "txt^:已连续签到-$&1",
"value": {
"type": "click",
"desc": "点击控件",
"class": "2",
"debug": false,
"mode": "2",
"random": true,
"descendant": [-1, -1, -1, 0],
"beforeWait": "0",
"afterWait": "1000",
"target": "view"
}
}, {
"key": "txt^:签到立得|txt^:立即签到|txt^:补签再得-$&1",
"value": {
"type": "click",
"desc": "点击控件",
"class": "2",
"debug": false,
"mode": "3",
"random": true,
"descendant": [],
"beforeWait": "0",
"afterWait": "1000",
"target": "view"
}
}, {
"key": "txt:领现金|txt^:我的抵用金-$&1",
"value": {
"type": "clickAndEnter",
"desc": "点击进入页面",
"class": "2",
"debug": true,
"checkTag": "txt:分享领现金-",
"mode": "2",
"failed": "exitTaskPopupWithAD",
"descendant": [],
"duration": "500",
"maxStep": "10",
"beforeWait": "0",
"afterWait": "0",
"target": "view",
"children": [{
"type": "findView",
"desc": "查找控件",
"debug": true,
"root": "",
"failed": "",
"duration": "500",
"maxStep": "5",
"beforeWait": "0",
"afterWait": "0",
"dealItems": [{
"key": "txt:可领取|txt:可兑换-",
"value": {
"type": "if",
"desc": "条件处理",
"class": "1",
"debug": true,
"target": "view",
"descendant": [-1, 1],
"conditions": "text@#>=:3@#",
"children": [{
"type": "click",
"desc": "点击3元",
"class": 1,
"debug": false,
"tag": "txt:3元-",
"mode": "2",
"root": "",
"failed": "exitTaskPopupWithAD",
"maxStep": "5",
"random": true,
"descendant": [],
"duration": "500",
"beforeWait": "0",
"afterWait": "1000"
}, {
"type": "clickAndEnter",
"desc": "点击进入提现界面",
"class": 1,
"debug": false,
"clickTag": "txt:立即领取|txt:立即兑换-",
"checkTag": "txt:极速到账|txt:立即提现-",
"root": "",
"mode": "2",
"failed": "",
"descendant": [],
"duration": "500",
"maxStep": "5",
"beforeWait": "0",
"afterWait": "0",
"children": [{
"type": "if",
"desc": "是否为极速到账",
"class": 1,
"debug": true,
"target": "view",
"descendant": [],
"conditions": "text@#precise:极速到账@#",
"children": [{
"type": "clickAndEnter",
"desc": "点击进入分享页面",
"class": 1,
"debug": true,
"clickTag": "txt:极速到账-",
"checkTag": "txt:选择一个聊天|txt:选择-",
"root": "",
"mode": "2",
"failed": "",
"descendant": [],
"duration": "500",
"maxStep": "20",
"beforeWait": "0",
"afterWait": "2000",
"children": [{
"type": "back",
"desc": "按返回键",
"debug": false,
"count": "1",
"duration": "1000",
"beforeWait": "0",
"afterWait": "5000"
}]
}]
}, {
"type": "clickAndEnter",
"desc": "进入提现页面",
"class": 1,
"debug": true,
"clickTag": "txt:立即提现-",
"checkTag": "txt:获取验证码-",
"root": "",
"mode": "2",
"failed": "",
"descendant": [],
"duration": "500",
"maxStep": "10",
"beforeWait": "0",
"afterWait": "0",
"children": [{
"type": "click",
"desc": "获取验证码",
"class": "2",
"debug": false,
"mode": "2",
"random": true,
"descendant": [],
"beforeWait": "0",
"afterWait": "1000",
"target": "view",
"children": [{
"type": "loop",
"desc": "循环等待验证码到来",
"class": 1,
"debug": true,
"minRunTime": "0.5",
"maxRunTime": "0.5",
"children": [{
"type": "if",
"desc": "条件处理",
"class": "2",
"debug": true,
"descendant": [],
"expr": "gCaptcha!=''",
"children": [{
"type": "paste",
"desc": "粘贴文本",
"class": 1,
"debug": true,
"data": "var-gCaptcha",
"tag": "id:verifyCodeInput-",
"root": "",
"descendant": [],
"mode": "set",
"duration": "500",
"maxStep": "5",
"beforeWait": "0",
"afterWait": "3000"
}, {
"type": "click",
"desc": "点击控件",
"class": 1,
"debug": true,
"tag": "txt:下一步-",
"mode": "1",
"root": "",
"failed": "",
"maxStep": "5",
"random": true,
"descendant": [],
"duration": "500",
"beforeWait": "0",
"afterWait": "3000"
}, {
"type": "break",
"desc": "跳出循环"
}],
"false": {
"type": "sleep",
"desc": "延时",
"debug": false,
"minTime": "1000",
"maxTime": "1000"
}
}]
}],
"false": {}
}],
"false": {}
}]
}],
"false": {
"type": "log",
"desc": "日志",
"debug": false,
"logType": "log",
"info": ["string-if 为false"]
}
}
}]
}, {
"type": "back2Page",
"desc": "返回页面",
"debug": false,
"tag": "txt:任务中心|txt:我的金币-",
"root": "",
"backFirst": "true",
"failed": "exitTaskPopupWithAD",
"duration": "500",
"maxStep": "5",
"beforeWait": "0",
"afterWait": "0"
}],
"false": {}
}
}],
"false": {
"type": "scroll",
"desc": "滚动处理",
"class": 1,
"debug": true,
"direction": "up",
"minDistance": "0.9",
"maxDistance": "0.98",
"minScrollCount": "1",
"maxScrollCount": "1",
"minDuration": "500",
"maxDuration": "500",
"beforeWait": "1000",
"afterWait": "1000"
}
}],
"family": [],
"false": {}
}, {
"type": "click",
"desc": "开宝箱领金币",
"class": "4",
"debug": true,
"descendant": [],
"duration": "500",
"beforeWait": "0",
"afterWait": "3000",
"x": "rsScreenWidth,-,100",
"y": "rsScreenHeight,-,130",
"unit": "px",
"children": [{
"type": "click",
"desc": "点击控件",
"class": 1,
"debug": true,
"tag": "txt^:看视频最高得-",
"mode": "2",
"root": "",
"failed": "",
"maxStep": "5",
"random": true,
"descendant": [],
"duration": "500",
"beforeWait": "0",
"afterWait": "5000"
}]
}, {
"type": "back2Page",
"desc": "返回页面",
"debug": true,
"tag": "id:com.kuaishou.nebula:id/left_btn-",
"root": "",
"backFirst": "true",
"failed": "exitTaskPopupWithAD",
"duration": "500",
"maxStep": "8",
"beforeWait": "0",
"afterWait": "0"
}],
"family": [],
"false": {}
}, {
"type": "group",
"desc": "看视频",
"debug": false,
"children": [{
"type": "loop",
"desc": "循环看视频",
"class": "2",
"debug": true,
"minCount": "8",
"maxCount": "12",
"children": [{
"type": "loop",
"desc": "看视频",
"class": 1,
"debug": false,
"minRunTime": "0.1",
"maxRunTime": "0.2",
"children": [{
"type": "findView",
"desc": "查找控件",
"debug": false,
"root": "",
"failed": "exitPopupWithAD",
"duration": "500",
"maxStep": "5",
"beforeWait": "0",
"afterWait": "0",
"dealItems": [{
"key": "txt:我要吐槽-",
"value": {
"type": "click",
"desc": "点击控件",
"class": "2",
"debug": false,
"mode": "2",
"random": true,
"descendant": [-1, -1, -1, 0],
"beforeWait": "0",
"afterWait": "1000",
"target": "view"
}
}]
}]
}, {
"type": "scroll",
"desc": "滚动处理",
"class": 1,
"debug": false,
"direction": "up",
"minDistance": "0.95",
"maxDistance": "0.99",
"minScrollCount": "1",
"maxScrollCount": "1",
"minDuration": "500",
"maxDuration": "500",
"beforeWait": "1000",
"afterWait": "1000"
}]
}, {
"type": "back2Page",
"desc": "返回页面",
"debug": true,
"tag": "id:com.kuaishou.nebula:id/left_btn-",
"root": "",
"backFirst": "false",
"failed": "exitPopupWithAD",
"duration": "500",
"maxStep": "5",
"beforeWait": "0",
"afterWait": "0"
}]
}],
"autoExit": true
}, {
"type": "popup",
"name": "exitPopupWithAD",
"false": ["exitPopup", "dealAD"],
"desc": "弹窗处理",
"debug": false
}, {
"type": "popup",
"name": "exitTaskPopupWithAD",
"desc": "弹窗处理",
"debug": false,
"false": ["dealAD"],
"dealItems": [{
"key": "txt:是否关注该主播?-",
"value": {
"type": "click",
"desc": "点击控件",
"class": 1,
"debug": false,
"tag": "txt:退出-",
"mode": "2",
"root": "",
"failed": "",
"maxStep": "5",
"random": true,
"descendant": [],
"duration": "500",
"beforeWait": "0",
"afterWait": "1000"
}
}, {
"key": "txt:继续观看-",
"value": {
"type": "click",
"desc": "点击控件",
"class": "2",
"debug": false,
"mode": "2",
"random": true,
"descendant": [],
"beforeWait": "0",
"afterWait": "1000",
"target": "view"
}
}, {
"key": "txt:打开签到提醒-",
"value": {
"type": "click",
"desc": "点击控件",
"class": "2",
"debug": true,
"mode": "3",
"random": true,
"descendant": [-1, 0],
"beforeWait": "0",
"afterWait": "1000",
"target": "view"
}
}]
}, {
"type": "popup",
"name": "exitPopup",
"desc": "弹窗处理",
"debug": false,
"false": [],
"dealItems": []
}, {
"type": "ad",
"desc": "广告处理",
"debug": true,
"enterWindowList": ["com.yxcorp.gifshow.ad.award.AwardVideoPlayActivity"],
"enterTags": "txt$:后可领取奖励-",
"breakTags": "txt:任务中心-",
"dealItems": [{
"key": "id:com.kuaishou.nebula:id/video_close_icon|txt:继续观看-",
"value": {
"type": "click",
"desc": "点击控件",
"class": "2",
"debug": false,
"mode": "2",
"random": true,
"descendant": [],
"beforeWait": "0",
"afterWait": "1000",
"target": "view"
}
}]
}, {
"type": "windowChange",
"desc": "窗口变化处理",
"debug": true
}, {
"type": "notification",
"children": [],
"desc": "通知处理",
"debug": true,
"dealItems": [{
"key": "验证码",
"value": {
"type": "custom",
"desc": "自定义模块",
"debug": true,
"code": "var data = item.fetchInteger();\nif (data.length > 0) {\ngCaptcha=data[0]+'';\nconsole.log('captcha:'+gCaptcha);\n}\n"
}
}],
"packageName": "",
"declareVar": false,
"stopMainTaskBeforeStart": false,
"exeDefaultTaskWhenFinished": false
}],
"desc": "根模块",
"debug": false
}