-
Notifications
You must be signed in to change notification settings - Fork 100
/
Copy path快手极速版专属.js
171 lines (150 loc) · 5.83 KB
/
快手极速版专属.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
/**使用本脚本的同学请填写邀请码:
* 抖音极速版邀请码:87429262 (推荐)
* 快手极速版邀请码:663409711 (推荐)
* 今日头条极速版邀请码:1181369091 (暂不适用)
* 火山极速版邀请码:258239608 (2021年可能没了)
* 谢谢大家!支持作者继续开发。本插件完全免费,仅用于学习
* 请勿用于非法用途!
*/
/**快手极速版新页面 */
/**-------------------------打开APP-------------------------------- */
auto.waitFor()
let times = rawInput("请输入要自动刷的视频次数:", "500") //用户设置刷视频的个数,默认100
launchApp("快手极速版");
console.show() //显示悬浮窗(需要先打开悬浮窗权限)
sleep(5000) //等待应用打开
console.log("准备就绪!")
videos()
dytimes(1000, 3000)
/**-------------------------打开福利页面-------------------------------- */
id("left_btn").click()//点击菜单
dytimes(2000, 4000)
drawingOrder("3").id("container").click()// drawingOrder("2") 点击去赚钱
dytimes(2000, 4000)
/**-------------------------调用方法-------------------------------- */
welfare()
dytimes(1000, 3000)
liveds()
dytimes(1000, 3000)
console.hide()
home();//回到首页
/**-------------------------10次福利金币-------------------------------- */
function welfare() {
swipe(device.width / 2, device.height * (8 / 9), device.width / 2, device.height * (1 / 2), 150)
dytimes(3000, 5000);
var i = 1
while (true) {
i = i + 1;
if (text("福利 领金币").findOnce()) {
text("福利 领金币").click();
console.log("第" + i + "次广告福利")
//等待广告关闭按钮点击
dytimes(3000, 5000);
id("video_close_icon").waitFor()
id("video_close_icon").click()
dytimes(3000, 5000);
}
if (text("福利").findOnce()) {
text("福利").click();
console.log("第" + i + "次广告福利")
//等待广告关闭按钮点击
dytimes(3000, 5000);
id("video_close_icon").waitFor()
id("video_close_icon").click()
dytimes(3000, 5000);
}
if (className("android.view.View").text("明天看视频继续领取1000金币").exists() || i == 20) {
console.log("10次广告福利结束啦!" + i);
break;
}
}
}
/**-------------------------10次直播金币-------------------------------- */
function liveds() {
swipe(device.width / 2, device.height * (8 / 9), device.width / 2, device.height * (1 / 4), 150)
dytimes(3000, 5000);
console.log("开始看直播10次咯!")
if (className("android.view.View").text("今日已成功领取直播奖励金币").exists()) {
console.log("10次直播福利结束啦!二次运行");
back()
}
else {
className("android.view.View").text("直播送礼赚金币").findOne().parent().click()
text("看直播").click()
for (let i = 1; i <= 10; i++) {
console.log("第" + i + "次直播奖励")
sleep(92 * 1000)
swipe(device.width / 2, device.height * (8 / 9), device.width / 2, device.height * (1 / 4), 150)
if (text("close_btn").exists()) {
text("close_btn").click()
console.log("有关注主播弹出");
// id("close_btn").waitFor()
} else if (i == 10) {
console.log("10次直播福利结束啦!里面");
console.hide()
home();//回到首页
// back();
// back();
// back();
// if (id("exit_btn").exists()) {
// id("exit_btn").findOne().click()
// back();
// sleep(3000)
// back();
// }
}
}
}
}
/**-------------------------按需刷小视频-------------------------------- */
function videos() {
for (var i = 0; i < times; ++i) {
nextVideo(device.width / 2, device.height * (8 / 9), device.width / 2, device.height * (1 / 4), 150)
u = i + 1
console.log("总任务量:" + times + ";已完成:" + u)
/*随机回看 */
j = random(1, 20)
if (j == 3) {
lookBack()
}
if (j == 20) {
nextTwo()
}
if(i==times){
break;
}
}
}
/**-------------------------各种方法-------------------------------- */
function nextVideo(x1, y1, x2, y2, duration) {
swipe(x1, y1, x2, y2, duration)
delayTime = random(8000, 12000)
sleep(delayTime) //在视频停留8-12秒
}
/*随机往回滑动 */
function lookBack() {
let back = random(1, 20)
if (back == 1) {
console.log("开始往回看一个视频")
swipe(device.width / 2, device.height * (1 / 4), device.width / 2, device.height * (8 / 9), 150)
sleep(random(10000, 15000))
}
}
/*向下滑动两个 在向回滑动之后执行 */
function nextTwo() {
swipe(device.width / 2, device.height * (8 / 9), device.width / 2, device.height * (1 / 4), 150)
swipe(device.width / 2, device.height * (8 / 9), device.width / 2, device.height * (1 / 4), 150)
sleep(random(10000, 15000))
}
function dytimes(time1, time2) {
delayTime = random(time1, time2)
sleep(delayTime) //在视频停留8-12秒
}
/**使用本脚本的同学请填写邀请码:
* 抖音极速版邀请码:87429262 (推荐)
* 快手极速版邀请码:663409711 (推荐)
* 今日头条极速版邀请码:1181369091 (暂不适用)
* 火山极速版邀请码:258239608 (2021年可能没了)
* 谢谢大家!支持作者继续开发。本插件完全免费,仅用于学习
* 请勿用于非法用途!
*/