forked from changer2222/autoVideo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
网赚-总.js
130 lines (120 loc) · 3.06 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
auto();
console.setGlobalLogConfig({
"file": "/sdcard/网赚.txt"
});
console.show()
images.requestScreenCapture(false)
log("已获得截屏权限")
const perAppRunTime=3.5*60*60 //每隔应用刷2小时
//快手极速版
log("开始启动")
main()
let totalTimeInThread=0;//每个线程使用的时间,用于线程之间共享的变量
function main(){
// // startThread(kuaishou,"快手",4*3600)
// startThread(huoshan,"火山",1.2*3600)
// startThread(douguagua,"抖呱呱",2*3600)
startThread(shuabao,"刷宝",2*3600)
startThread(douyin,"抖音",2*3600)
startThread(juKanDianFunc,"聚看点",2*3600)
startThread(quTouTiaoFunc,"趣头条",2*3600)
startThread(xueXiQiangGuoFunc,"学习强国",1*3600)
log("任务完成")
}
//启动指定以方法为主体的线程,同时传入线程名,运行最大时长(S)
function startThread(functionName,name,appRunTime){
totalTimeInThread=appRunTime;
let indexThread=threads.start(functionName)
for(let i=0;i<appRunTime/10;i++){
//总共等待2小时,每次循环等待10s
sleep(10000)
if(!indexThread.isAlive()){
log(name+"线程已死")
break;
}
log("总线程等待"+(i+1)+"0秒")
}
indexThread.interrupt()
log(name+"线程结束了")
home()
}
function kuaishou(){
try {
var kuaishouJS = require('快手极速版.js');
kuaishouJS.main(totalTimeInThread)
} catch (error) {
log("快手出现问题")
log(error)
return
}
}
function huoshan(){
try {
var app = require('火山极速版.js');
app.main(totalTimeInThread)
} catch (error) {
log("火山出现问题")
log(error)
return
}
}
function douyin(){
try {
var app = require('抖音极速版.js');
app.main(totalTimeInThread)
} catch (error) {
log("抖音出现问题")
log(error)
return
}
}
function shuabao(){
try {
var app = require('刷宝短视频.js');
app.main(totalTimeInThread)
} catch (error) {
log("刷宝出现问题")
log(error)
return
}
}
function douguagua(){
try {
var app = require('抖呱呱极速版.js');
app.main(totalTimeInThread)
} catch (error) {
log("抖呱呱出现问题")
log(error)
return
}
}
function xueXiQiangGuoFunc(){
try {
var xueXiQiangGuo = require('学习强国.js');
xueXiQiangGuo.main(totalTimeInThread)
} catch (error) {
log("学习强国出现问题")
log(error)
return
}
}
function juKanDianFunc(){
try {
var juKanDian = require('聚看点.js');
juKanDian.main(totalTimeInThread)
} catch (error) {
log("聚看点出现问题")
log(error)
return
}
}
function quTouTiaoFunc(){
try {
var quTouTiao = require('趣头条.js');
quTouTiao.main(totalTimeInThread)
} catch (error) {
log("趣头条出现问题")
log(error)
return
}
}