找回密码
 立即注册
查看: 253|回复: 0

中青看点阅读新闻

[复制链接]
发表于 2022-7-5 21:42 | 显示全部楼层 |阅读模式
最近几年人工智能推荐应用到了新闻里面越来越火了,尤其是头条,网易,趣头条,中青看点之类的非常不错,大多数都是通过手工来阅读,会浪费大家很多时间,今天我来使用一个完全不同的方法,不编程直接通过配置参数来实现阅读,实现步骤如下:
创建自动构建

进入冰狐智能辅助在网页端「移动端」/「自动构建脚本」中新建一个“构建”。
自动填充模块和参数

通过元数据可以直接复制一个完全一样的构建。在上一步创建的构建右边点击“元数据”按钮,将如下元数据拷贝进入并保存,此时系统会根据元数据自动完成模块参数配置。

{

"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",

"packageName": "cn.youth.news",

"findTag": "txt:推荐|txt:关注-",

"autoInstall": false,

"autoUpdate": false,

"wait": "1000",

"failed": "exitPopup",

"maxStep": "30",

"children": [{

"type": "clickAndEnter",

"desc": "点击进入任务",

"class": 1,

"clickTag": "id:android:id/content-",

"checkTag": "txt:去提现-",

"root": "",

"mode": "2",

"failed": "exitPopup",

"descendant": [],

"duration": "500",

"maxStep": "5",

"beforeWait": "0",

"afterWait": "0",

"children": [{

"type": "log",

"desc": "日志",

"logType": "log",

"info": ["string-进入任务"]

}, {

"type": "searchAndLoopDeal",

"desc": "滚动处理多个任务",

"root": "",

"retryCount": "3",

"false": {

"type": "scroll",

"desc": "滚动处理",

"class": 1,

"direction": "up",

"minDistance": "0.8",

"maxDistance": "0.98",

"minScrollCount": "1",

"maxScrollCount": "1",

"minDuration": "500",

"maxDuration": "500",

"beforeWait": "2000",

"afterWait": "2000"

},

"failed": "exitPopupWithAD",

"duration": "500",

"maxStep": "5",

"beforeWait": "0",

"afterWait": "0",

"dealItems": [{

"key": "txt:领奖励|txt:可领-$&2",

"value": {

"type": "click",

"desc": "点击控件",

"class": "2",

"mode": "1",

"descendant": [],

"beforeWait": "0",

"afterWait": "5000",

"target": "view"

}

}, {

"key": "txt^:看福利视频-$&2",

"value": {

"type": "if",

"desc": "条件处理",

"class": 1,

"target": "view",

"descendant": [-1, -1, -1, 1, 0],

"conditions": "text@#precise:去完成@#",

"children": [{

"type": "click",

"desc": "点击控件",

"class": "2",

"mode": "1",

"descendant": [-1, -1, -1, 1, 0],

"beforeWait": "0",

"afterWait": "2000",

"target": "view"

}]

}

}, {

"key": "txt:火爆转发-$&1",

"value": {

"type": "clickAndEnter",

"desc": "点击进入转发页面",

"class": "2",

"checkTag": "txt:转发资讯赚钱-",

"mode": "2",

"failed": "exitPopup",

"descendant": [],

"duration": "500",

"maxStep": "5",

"beforeWait": "0",

"afterWait": "3000",

"target": "view",

"children": [{

"type": "clickAndEnter",

"desc": "点击进入页面",

"class": 1,

"clickTag": "txt:转发资讯继续赚钱-",

"checkTag": "txt:转发记录-",

"root": "",

"mode": "2",

"failed": "",

"descendant": [],

"duration": "500",

"maxStep": "5",

"beforeWait": "0",

"afterWait": "0",

"children": [{

"type": "click",

"desc": "去分享",

"class": 1,

"tag": "",

"mode": "2",

"root": "",

"failed": "",

"maxStep": "5",

"descendant": [],

"duration": "500",

"beforeWait": "0",

"afterWait": "1000"

}]

}, {

"type": "back2Page",

"desc": "返回页面",

"tag": "txt:去提现|txt:每日任务-",

"root": "",

"backFirst": "true",

"failed": "exitPopup",

"duration": "500",

"maxStep": "5",

"beforeWait": "0",

"afterWait": "0"

}]

}

}, {

"key": "txt^:搜索领青豆-$&1",

"value": {

"type": "if",

"desc": "条件处理",

"class": 1,

"target": "view",

"descendant": [-1, -1, -1, 1, 0],

"conditions": "text@#precise:去完成@#",

"children": [{

"type": "clickAndEnter",

"desc": "点击进入页面",

"class": "2",

"checkTag": "txt:搜索-",

"mode": "1",

"failed": "exitPopupWithAD",

"descendant": [-1, -1, -1, 1, 0],

"duration": "500",

"maxStep": "5",

"beforeWait": "0",

"afterWait": "0",

"target": "view",

"children": [{

"type": "traverse",

"desc": "遍历容器",

"class": 1,

"tag": "txt:去搜索-find_all",

"failed": "",

"descendant": [],

"startIndex": "0",

"lastIndex": "0",

"retryCount": "0",

"randomPick": false,

"traverseSelf": true,

"clickable": false,

"className": "",

"children": [{

"type": "clickAndEnter",

"desc": "点击进入页面",

"class": "2",

"checkTag": "id:wordListWrapper-",

"mode": "2",

"failed": "",

"descendant": [],

"duration": "500",

"maxStep": "5",

"beforeWait": "0",

"afterWait": "0",

"target": "item",

"children": [{

"type": "traverse",

"desc": "遍历容器",

"class": "2",

"descendant": [],

"startIndex": "0",

"lastIndex": "0",

"randomPick": true,

"clickable": false,

"className": "",

"target": "view",

"children": [{

"type": "click",

"desc": "点击控件",

"class": "2",

"mode": "1",

"descendant": [],

"beforeWait": "0",

"afterWait": "3000",

"target": "item"

}, {

"type": "break",

"desc": "跳出循环"

}]

}]

}, {

"type": "back2Page",

"desc": "返回页面",

"tag": "txt:搜索-",

"root": "",

"backFirst": "false",

"failed": "",

"duration": "500",

"maxStep": "5",

"beforeWait": "0",

"afterWait": "0"

}]

}, {

"type": "back2Page",

"desc": "返回页面",

"tag": "txt:每日任务|txt:进阶任务-",

"root": "",

"backFirst": "true",

"failed": "",

"duration": "500",

"maxStep": "5",

"beforeWait": "0",

"afterWait": "0"

}]

}]

}

}, {

"key": "txt:点击翻倍-$&1",

"value": {

"type": "click",

"desc": "点击控件",

"class": "2",

"mode": "2",

"descendant": [],

"beforeWait": "0",

"afterWait": "1000",

"target": "view"

}

}, {

"key": "txt:抽奖赚-$&1",

"value": {

"type": "clickAndEnter",

"desc": "点击进入抽奖页面",

"class": "2",

"checkTag": "txt:天天抽奖-",

"mode": "2",

"failed": "",

"descendant": [],

"duration": "500",

"maxStep": "5",

"beforeWait": "0",

"afterWait": "0",

"target": "view",

"children": [{

"type": "loop",

"desc": "循环多次抽奖",

"class": "2",

"minCount": "15",

"maxCount": "18",

"children": [{

"type": "findView",

"desc": "查找抽奖控件",

"root": "",

"failed": "exitPopupLottery",

"duration": "500",

"maxStep": "10",

"beforeWait": "0",

"afterWait": "0",

"dealItems": [{

"key": "id:J_gift-",

"value": {

"type": "click",

"desc": "点击抽奖",

"class": "2",

"mode": "1",

"random": false,

"descendant": [],

"beforeWait": "0",

"afterWait": "6000",

"target": "view"

}

}],

"false": {

"type": "break",

"desc": "跳出循环"

}

}]

}, {

"type": "back2Page",

"desc": "返回页面",

"tag": "txt:每日任务-",

"root": "",

"backFirst": "true",

"failed": "exitPopupLottery",

"duration": "500",

"maxStep": "5",

"beforeWait": "0",

"afterWait": "0",

"false": {

"type": "log",

"desc": "日志",

"logType": "error",

"info": ["string-抽奖-返回页面失败"]

}

}]

}

}, {

"key": "id:cn.youth.news:id/ae0#$&1",

"value": {

"type": "click",

"desc": "点击",

"class": "2",

"debug": false,

"family": [],

"descendant": [],

"mode": "2",

"longClick": false,

"random": true,

"beforeWait": "0",

"afterWait": "1000",

"target": "view"

}

}],

"debug": false

}, {

"type": "back2Page",

"desc": "返回页面",

"tag": "txt:每日任务|txt:进阶任务-",

"root": "",

"backFirst": "false",

"failed": "",

"duration": "500",

"maxStep": "8",

"beforeWait": "0",

"afterWait": "0"

}, {

"type": "log",

"desc": "日志",

"logType": "log",

"info": ["string-结束任务"]

}],

"debug": false,

"clickWidgetIndex": "0",

"family": [1, 3, 4],

"false": {}

}, {

"type": "clickAndEnter",

"desc": "点击进入阅读新闻",

"class": 1,

"clickTag": "id:android:id/content-",

"checkTag": "txt:推荐-",

"root": "",

"mode": "2",

"failed": "exitPopupWithAD",

"descendant": [0, 2, 0],

"duration": "500",

"maxStep": "5",

"beforeWait": "0",

"afterWait": "0",

"children": [{

"type": "loop",

"desc": "循环阅读多个文件",

"class": 1,

"minRunTime": "4",

"maxRunTime": "6",

"children": [{

"type": "scroll",

"desc": "滚动处理",

"class": 1,

"direction": "up",

"minDistance": "0.95",

"maxDistance": "0.98",

"minScrollCount": "1",

"maxScrollCount": "3",

"minDuration": "500",

"maxDuration": "500",

"beforeWait": "2000",

"afterWait": "1000",

"debug": true

}, {

"type": "traverse",

"desc": "遍历新闻容器",

"class": 1,

"tag": "id:cn.youth.news:id/a5f#",

"failed": "exitPopupWithAD",

"descendant": [],

"startIndex": "0",

"lastIndex": "0",

"retryCount": "0",

"randomPick": true,

"clickable": false,

"className": "android.widget.LinearLayout",

"children": [{

"type": "clickAndEnter",

"desc": "点击进入新闻",

"class": "2",

"checkTag": "txt^:我来说两句|id:cn.youth.news:id/at9-",

"mode": "2",

"failed": "exitPopup",

"descendant": [],

"duration": "500",

"maxStep": "5",

"beforeWait": "0",

"afterWait": "0",

"target": "item",

"children": [{

"type": "loop",

"desc": "阅读新闻",

"class": 1,

"minRunTime": "0.4",

"maxRunTime": "1",

"children": [{

"type": "scroll",

"desc": "滚动页面",

"class": 1,

"direction": "up",

"minDistance": "0.3",

"maxDistance": "0.5",

"minScrollCount": "1",

"maxScrollCount": "1",

"minDuration": "500",

"maxDuration": "1500",

"beforeWait": "1000",

"afterWait": "1000",

"debug": true

}, {

"type": "findView",

"desc": "查找控件",

"root": "",

"failed": "",

"duration": "500",

"maxStep": "5",

"beforeWait": "0",

"afterWait": "0",

"dealItems": [{

"key": "txt:查看全文,奖励更多-",

"value": {

"type": "click",

"desc": "点击控件",

"class": "2",

"mode": "3",

"random": true,

"descendant": [],

"beforeWait": "0",

"afterWait": "1000",

"target": "view",

"debug": false

}

}, {

"key": "txt:分享微信|txt:精彩评论-",

"value": {

"type": "break",

"desc": "跳出循环",

"class": 1,

"debug": false

}

}],

"debug": true

}],

"debug": true

}, {

"type": "log",

"desc": "日志",

"logType": "log",

"info": ["string-阅读一篇新闻完成"],

"debug": false

}, {

"type": "back2Page",

"desc": "返回首页",

"tag": "txt:推荐-",

"root": "",

"backFirst": "true",

"failed": "exitPopup",

"duration": "500",

"maxStep": "5",

"beforeWait": "0",

"afterWait": "0",

"debug": true

}],

"debug": true,

"false": {

"type": "back2Page",

"desc": "返回页面",

"debug": false,

"tag": "txt:推荐-",

"root": "",

"backFirst": "false",

"failed": "",

"duration": "500",

"maxStep": "5",

"beforeWait": "0",

"afterWait": "0"

},

"family": []

}],

"traverseSelf": false,

"debug": true,

"family": [],

"randomPickCount": "0"

}, {

"type": "findView",

"desc": "领取奖励",

"root": "",

"failed": "exitPopupWithAD",

"duration": "500",

"maxStep": "5",

"beforeWait": "0",

"afterWait": "0",

"dealItems": [{

"key": "txt:青豆-traverse_one_by_one",

"value": {

"type": "clickAndEnter",

"desc": "领青豆",

"class": "2",

"checkTag": "txt:点击领取-",

"mode": "2",

"failed": "",

"descendant": [],

"duration": "500",

"maxStep": "5",

"beforeWait": "0",

"afterWait": "0",

"target": "view",

"children": [{

"type": "click",

"desc": "点击控件",

"class": "2",

"mode": "2",

"descendant": [],

"beforeWait": "0",

"afterWait": "1000",

"target": "view"

}, {

"type": "back2Page",

"desc": "返回页面",

"tag": "txt:推荐-",

"root": "",

"backFirst": "true",

"failed": "exitPopup",

"duration": "500",

"maxStep": "5",

"beforeWait": "0",

"afterWait": "0"

}]

}

}, {

"key": "id:cn.youth.news:id/q8-",

"value": {

"type": "if",

"desc": "右上角领钱",

"children": [{

"type": "click",

"desc": "点击控件",

"class": "2",

"mode": "2",

"descendant": [],

"beforeWait": "0",

"afterWait": "3000",

"target": "view",

"random": false

}],

"class": 1,

"target": "view",

"descendant": [-1],

"conditions": "size@#1@#"

}

}],

"debug": true

}],

"debug": true

}, {

"type": "back2Page",

"desc": "返回页面",

"tag": "txt:推荐-",

"root": "",

"backFirst": "false",

"failed": "exitPopupWithAD",

"duration": "500",

"maxStep": "5",

"beforeWait": "0",

"afterWait": "0",

"debug": true

}],

"debug": true,

"clickWidgetIndex": "0",

"family": []

}, {

"type": "clickAndEnter",

"desc": "点击进入视频",

"class": 1,

"clickTag": "id:android:id/content-",

"checkTag": "txt:搞笑|txt:广场舞-",

"root": "",

"mode": "2",

"failed": "exitPopup",

"descendant": [],

"duration": "500",

"maxStep": "5",

"beforeWait": "0",

"afterWait": "0",

"children": [{

"type": "log",

"desc": "日志",

"logType": "log",

"info": ["string-进入视频"]

}, {

"type": "loop",

"desc": "循环处理",

"class": "2",

"minCount": "2",

"maxCount": "4",

"children": [{

"type": "scroll",

"desc": "滚动处理",

"class": 1,

"direction": "up",

"minDistance": "0.98",

"maxDistance": "0.99",

"minScrollCount": "1",

"maxScrollCount": "3",

"minDuration": "500",

"maxDuration": "500",

"beforeWait": "1000",

"afterWait": "1000"

}, {

"type": "log",

"desc": "日志",

"logType": "log",

"info": ["string-滚动结束"],

"debug": false

}, {

"type": "traverse",

"desc": "遍历容器",

"class": 1,

"tag": "id:cn.youth.news:id/a5f#",

"failed": "exitPopup",

"descendant": [],

"startIndex": "0",

"lastIndex": "0",

"retryCount": "0",

"randomPick": true,

"traverseSelf": false,

"clickable": false,

"className": "android.widget.FrameLayout",

"children": [{

"type": "clickAndEnter",

"desc": "点击进入视频",

"class": "2",

"checkTag": "txt^:我来说两句-",

"mode": "1",

"failed": "exitPopup",

"descendant": [],

"duration": "500",

"maxStep": "5",

"beforeWait": "0",

"afterWait": "0",

"target": "item",

"children": [{

"type": "loop",

"desc": "看视频",

"class": 1,

"minRunTime": "0.5",

"maxRunTime": "1.2",

"children": [{

"type": "break",

"desc": "跳出循环",

"class": "2",

"breakTag": "id:cn.youth.news:id/ln-",

"failed": "",

"debug": false

}],

"debug": false

}, {

"type": "back2Page",

"desc": "返回页面",

"tag": "txt:推荐|txt:搞笑-",

"root": "",

"backFirst": "true",

"failed": "exitPopup",

"duration": "500",

"maxStep": "5",

"beforeWait": "0",

"afterWait": "0",

"debug": false

}],

"debug": false,

"family": []

}],

"debug": false,

"family": [],

"randomPickCount": "0"

}],

"debug": false,

"indexVarName": "index"

}],

"debug": false,

"clickWidgetIndex": "0",

"family": [1, 3, 2]

}],

"debug": true,

"autoExit": false

}, {

"type": "popup",

"name": "exitPopup",

"desc": "弹窗处理",

"false": [],

"dealItems": [{

"key": "txt^:恭喜获得-",

"value": {

"type": "click",

"desc": "点击控件",

"class": 1,

"tag": "txt:忽略-",

"mode": "2",

"root": "",

"failed": "",

"maxStep": "5",

"descendant": [],

"duration": "500",

"beforeWait": "0",

"afterWait": "1000"

}

}, {

"key": "txt:开心收下|txt^:看视频再赚|txt:我知道了-",

"value": {

"type": "click",

"desc": "点击控件",

"class": "2",

"mode": "2",

"descendant": [],

"beforeWait": "0",

"afterWait": "1000",

"target": "view"

}

}, {

"key": "txt:邀请好友赚现金-",

"value": {

"type": "group",

"desc": "模块组",

"children": [{

"type": "click",

"desc": "点击开宝箱",

"class": 1,

"tag": "txt:开宝箱-",

"mode": "2",

"root": "",

"failed": "",

"maxStep": "5",

"descendant": [],

"duration": "500",

"beforeWait": "0",

"afterWait": "1000"

}, {

"type": "back2Page",

"desc": "返回任务页面",

"tag": "txt:每日任务|txt:进阶任务-",

"root": "",

"backFirst": "true",

"failed": "",

"duration": "500",

"maxStep": "5",

"beforeWait": "0",

"afterWait": "0"

}]

}

}]

}, {

"type": "popup",

"name": "exitPopupWithAD",

"false": ["exitPopup", "dealAD"]

}, {

"type": "popup",

"desc": "弹窗处理",

"name": "exitPopupLottery",

"false": [],

"dealItems": [{

"key": "txt:继续抽奖-",

"value": {

"type": "click",

"desc": "点击控件",

"class": "2",

"mode": "2",

"descendant": [],

"beforeWait": "0",

"afterWait": "1000",

"target": "view"

}

}, {

"key": "txt:关闭|txt:跳过-",

"value": {

"type": "click",

"desc": "点击控件",

"class": "2",

"mode": "2",

"descendant": [],

"beforeWait": "0",

"afterWait": "1000",

"target": "view",

"random": true

}

}]

}, {

"type": "ad",

"desc": "广告处理",

"enterWindowList": ["com.bytedance.sdk.openadsdk.stub.activity.Stub_Standard_Portrait_Activity", "com.qq.e.ads.RewardvideoPortraitADActivity"],

"enterTags": "id:com.byted.pangle:id/tt_reward_full_root|txt$:秒可获得奖励|txt$:秒后发放-",

"breakTags": "txt:推荐|txt:每日任务|txt:进阶任务-",

"dealItems": [{

"key": "id:com.byted.pangle:id/tt_video_ad_close_layout|txt:继续观看视频|txt:不感兴趣|txt:继续浏览-",

"value": {

"type": "click",

"desc": "点击控件",

"class": "2",

"mode": "2",

"descendant": [],

"beforeWait": "0",

"afterWait": "1000",

"target": "view",

"random": true

}

}, {

"key": "txt$:跳过-",

"value": {

"type": "click",

"desc": "点击控件",

"class": "2",

"mode": "1",

"descendant": [],

"beforeWait": "0",

"afterWait": "1000",

"target": "view"

}

}, {

"key": "txt:恭喜获得奖励-",

"value": {

"type": "traverse",

"desc": "遍历容器",

"class": "2",

"descendant": [-1],

"startIndex": "0",

"lastIndex": "0",

"randomPick": false,

"clickable": true,

"className": "",

"target": "view",

"children": [{

"type": "click",

"desc": "点击控件",

"class": "2",

"mode": "2",

"descendant": [],

"beforeWait": "0",

"afterWait": "1000",

"target": "item"

}, {

"type": "break",

"desc": "跳出循环"

}]

}

}, {

"key": "id:android:id/content-",

"value": {

"type": "if",

"desc": "条件处理",

"class": 1,

"target": "view",

"descendant": [0, 0, 1],

"conditions": "clickable@#true&$className@#android.widget.ImageView&$position@#top,<,110%$left,>,600%$width,>,70%$width,<,90%$width,==,height::@#",

"children": [{

"type": "click",

"desc": "点击控件",

"class": "2",

"mode": "2",

"descendant": [0, 0, 1],

"beforeWait": "0",

"afterWait": "1000",

"target": "view"

}]

}

}, {

"key": "txt:反馈-",

"value": {

"type": "if",

"desc": "条件处理",

"class": 1,

"target": "view",

"descendant": [],

"conditions": "size@#2@#-1",

"children": [{

"type": "traverse",

"desc": "遍历容器",

"class": "2",

"descendant": [-1],

"startIndex": "0",

"lastIndex": "0",

"randomPick": false,

"clickable": false,

"className": "android.view.View",

"target": "view",

"children": [{

"type": "if",

"desc": "条件处理",

"class": 1,

"target": "item",

"descendant": [],

"conditions": "text@#precise:@#",

"children": [{

"type": "click",

"desc": "点击控件",

"class": "2",

"mode": "1",

"descendant": [],

"beforeWait": "0",

"afterWait": "1000",

"target": "item"

}, {

"type": "break",

"desc": "跳出循环"

}]

}]

}]

}

}]

}, {

"type": "windowChange"

}, {

"type": "notification",

"children": []

}],

"desc": "根模块",

"debug": false

}
编译运行

1.在网页端「移动端」/「自动构建脚本」点击右边的“编译”按钮,将自动构建编译成与自动构建名称相同的js脚本。

2.在网页端「移动端」/「移动端脚本」点击右边的“发布”按钮发布脚本。

3.在网页端「移动端」/「移动端脚本」点击右边的“运行”按钮,并选择设备,然后执行。
懒得打字嘛,点击右侧快捷回复 【右侧内容,后台自定义】
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Unity开发者联盟 ( 粤ICP备20003399号 )

GMT+8, 2024-11-25 22:34 , Processed in 0.091027 second(s), 25 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表