抖音、快手、火山、刷宝、彩蛋、火火、魔视、微视、八合一短视频刷金币教程
作者:互联网
目前可以用脚本精灵或者用auto.js开发。
目前分享一下用auto.js刷快手极速版。文章下方也有现成打包好的apk[
const perVideoWatchTime=5//每隔视频观看10秒
const halfDeviceHeight=device.height/2
const halfDeviceWidth=device.width/2
const videoSwipeDistance=halfDeviceHeight-100//视频下滑的长度 px
// test()
// onlyRun()
//只允许本脚本时,将上行解除注释
function onlyRun(){
auto();
console.show()
log(“开始快手极速版”)
images.requestScreenCapture(false)
log(“已获得截屏权限”)
let totalTime=26060 //刷2小时
run(totalTime)
1
2
3
4
5
6
7
8
}
function test(){
auto();
console.show()
log(“开始快手极速测试”)
images.requestScreenCapture(false)
log(“已获得截屏权限”)
click(“我知道了”)
exit()
}
var kuaiShou = {};
kuaiShou.main = function (totalTime) {
run(totalTime)
};
module.exports = kuaiShou;
function run(totalTime){
log(“计划时长:”+totalTime)
launchApp()
let watchTime=0;
for(let i=1;totalTime>watchTime;i++){
if(text(“拖动滑块”).findOnce()){
log(“出现验证码,结束”)
runOver()
break;
}
let waitTime=perVideoWatchTime+random(-4,4)
log(“本视频观看时长”+waitTime)
sleep(waitTime/21000);
likeAndfollow(7)
sleep(waitTime/21000);
watchTime+=waitTime
log(“已看:”+i+"个视频 "+watchTime+“秒”)
swipeVideo(i)
}
1
}
function launchApp(){
let isLauchApp=false
while(!isLauchApp){
log(“尝试启动”)
launchPackage(“com.kuaishou.nebula”)
sleep(10000)
let mesbox=id(“com.kuaishou.nebula:id/a4v”).findOnce()
if(mesbox){
mesbox.click()
}
mesbox=id(“com.kuaishou.nebula:id/close”).findOnce()
if(mesbox){
mesbox.click()
}
mesbox=text("我知道了").findOnce()
if(mesbox){
mesbox.click()
}
isLauchApp=id("com.kuaishou.nebula:id/circular_progress_bar").findOnce()
}
log(“已启动”)
}
//swipeCount,滑动视频的次数
function swipeVideo(swipeCount){
let offset=random(-100,0)
if(swipeCount%60){
// 双数的第6次下滑
swipe(halfDeviceWidth-random(-50,50), halfDeviceHeight+offset+(videoSwipeDistance/2),
halfDeviceWidth+random(-50,50), halfDeviceHeight+offset-(videoSwipeDistance/2), 30);
}else if(swipeCount%20){
//双数次上滑
swipe(halfDeviceWidth+random(-50,50), halfDeviceHeight+offset,
halfDeviceWidth+random(-50,50), halfDeviceHeight+offset+(videoSwipeDistance/2), 30);
}else {
//单数下滑
swipe(halfDeviceWidth-random(-50,50), halfDeviceHeight+offset+(videoSwipeDistance/2),
halfDeviceWidth+random(-50,50), halfDeviceHeight+offset-(videoSwipeDistance/2), 30);
}
}
//有range2+1分之一的概率点喜欢,range4+1分之一的概率点关注,关注必定喜欢
function likeAndfollow(range){
let isLike=random(-1range,range)
if(isLike0){
click(halfDeviceWidth,halfDeviceHeight)
sleep(50)
click(halfDeviceWidth,halfDeviceHeight)
log(“双击喜欢”)
let isFollow=random(-1range,range)
if(isFollow0){
text(“关注”).click()
log(“点了关注”)
}else{
// log(“不是点关注的概率:”+isFollow)
}
}else{
// log(“不是点喜欢的概率:”+isLike)
}
}
//是否已经不再有收益了
function isNoIncome(){
let isIncome=findIncomeIcon()
if(!isIncome){
sleep(6000)
isIncome=findIncomeIcon()
if(!isIncome){
log(“等待6秒,不见收益红包”)
return false
}
}
log(“正在收益中”)
return true;
}
标签:log,快手,random,halfDeviceWidth,50,微视,彩蛋,let,halfDeviceHeight 来源: https://blog.csdn.net/wakobe1314/article/details/105628464