Created
February 28, 2026 20:03
-
-
Save fanlushuai/7e132dbca7366fb20b641f9b71ebdc6b to your computer and use it in GitHub Desktop.
红果短剧自动跳过广告,流畅看剧
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function pageUpBySwipe(time) { | |
| var h = device.height; //屏幕高 | |
| var w = device.width; //屏幕宽 | |
| var x = random((w * 1) / 3, (w * 2) / 3); //横坐标随机。防止检测。 | |
| var h1 = (h / 6) * 5; //纵坐标6分之5处 | |
| var h2 = h / 6; //纵坐标6分之1处 | |
| console.log(time + "ms"); | |
| swipe(x, h1, x, h2, time); //向上翻页(从纵坐标6分之1处拖到纵坐标6分之5处) | |
| } | |
| let s = storages.create("jutime"); | |
| let t = s.get("time"); | |
| if (t) { | |
| time = t; | |
| } else { | |
| time = 600; | |
| } | |
| function eleInScreen(ele) { | |
| let bounds = ele.bounds(); | |
| return ( | |
| bounds.left >= 0 && | |
| bounds.left <= device.width && | |
| bounds.top >= 0 && | |
| bounds.top <= device.height && | |
| bounds.right <= device.width && | |
| bounds.right >= 0 && | |
| bounds.bottom <= device.height && | |
| bounds.bottom >= 0 | |
| ); | |
| } | |
| function task() { | |
| let ele = text("上滑继续观看短剧").findOnce(); | |
| if (ele && eleInScreen(ele)) { | |
| if (p) { | |
| time += 100; | |
| } | |
| pageUpBySwipe(time); | |
| s.put("time", time); | |
| p = true; | |
| sleep(3000); | |
| } else { | |
| p = false; | |
| } | |
| sleep(500); | |
| } | |
| p = false; | |
| while (1) { | |
| task(); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment