{ "name": "RedNoteBrowsingAndThumbsUp", "description": "小红书随机浏览和点赞", "variables": { "page-index": 0, "up-or-down": 0, "swipe-count": 0, "click-x": 0, "click-y": 0, "random-click-pos": "", "stay-duration": 0, "send-btn-pos": "", "b-like-click": 0, "video_like_btn_center_pos": "" }, "execute": [ { "type": "while", "condition": "1", "body": [ { "type": "random", "inVars": [ "1", "3" ], "outVars": [ "{swipe-count}" ] }, { "type": "schedule", "condition": { "interval": "7s", "repeat": "{swipe-count}" }, "interval": [ { "type": "fun", "method": "adb-swipe", "inVars": [ "up-down" ], "outVars": [] } ] }, { "type": "random", "inVars": [ "200", "780" ], "outVars": [ "{click-x}" ] }, { "type": "random", "inVars": [ "400", "1500" ], "outVars": [ "{click-y}" ] }, { "type": "set", "variable": "{random-click-pos}", "value": "{click-x},{click-y}" }, { "type": "fun", "method": "adb-click", "inVars": [ "{random-click-pos}" ], "outVars": [] }, { "type": "random", "inVars": [ 10, 2000 ], "outVars": [ "{stay-duration}" ] }, { "type": "try", "continueAfterFail": true, "try": [ { "type": "if", "condition": "{video_like_btn_center_pos} != \"\"", "then": [ { "type": "fun", "method": "img-center-point-location", "inVars": [ "视频点赞.png" ], "outVars": [ "{send-btn-pos}" ] }, { "type": "fun", "method": "persist-save", "inVars": [ "rednote_browse_video_like_btn", "{send-btn-pos}" ], "outVars": [] } ], "else": [ { "type": "fun", "method": "persist-read", "inVars": [ "rednote_browse_video_like_btn" ], "outVars": [ "{send-btn-pos}" ] } ] } ], "success": [ { "type": "random", "inVars": [ "2", "10" ], "outVars": [ "{swipe-count}" ] }, { "type": "for", "times": "{swipe-count}", "variable": "{i}", "body": [ { "type": "random", "inVars": [ 5, 30 ], "outVars": [ "{stay-duration}" ] }, { "type": "delay", "value": "{{stay-duration}}s" }, { "type": "fun", "method": "adb-swipe", "inVars": [ "down-up" ], "outVars": [] }, { "type": "if", "condition": "{stay-duration} > 25", "then": [ { "type": "random", "inVars": [ 0, 1 ], "outVars": [ "{b-like-click}" ] }, { "type": "if", "condition": "{b-like-click} == 1", "then": [ { "type": "fun", "method": "adb-click", "inVars": [ "{send-btn-pos}" ], "outVars": [] } ], "else": [] } ], "else": [] } ] } ], "fail": [ { "type": "echo", "inVars": [ "点赞图标匹配失败" ] } ] }, { "type": "fun", "method": "adb-keyevent", "inVars": [ "4" ], "outVars": [] } ] } ] }