火火视频极速版----这个APP我不建议大家安装。如下几个建议:
1、提现特困难,这里的困难不是障碍而是软件假死,我实验过,除了体现页面,其他页面都很流畅。就提现页面一进去就基本死了,在一点屏幕直接未响应。垃圾中的战斗机。完全不建议安装。
2、刷屏得金币费劲,目前还未攻克。正常刷屏问题不大,主要是每个一段时间给个金蛋,金蛋不砸就没有后继的金币了。目前我还没完全实现自动砸金蛋。
直接上 代码吧!
auto.waitFor();
let see_count = 1000;// rawInput('请输入滑动次数', '1000');
app.launchApp('火火视频极速版');
sleep(6000);
youngWin();
try {
let boundVideo = null;
let bottomMenu = className("android.widget.RelativeLayout").find();
//console.show(); //开启日志(悬浮窗权限)
//console.log(bottomMenu.length)
for (let i = 0; i < bottomMenu.length; i++) {
let video = bottomMenu[i].children().findOne(text("小视频"));
if (video != null) {
boundVideo = bottomMenu[i].bounds();
}
}
click(boundVideo.centerX(), boundVideo.centerY());
sleep(5000);
var x = device.width - 200;
var y = device.height - 200;
click(x, y);//点击1个视频
sleep(5000);
} catch (e) { }
for (var i = 1; i < see_count; i++) {
toast("火火视频滑动" + i + '次' + "总计:" + see_count + "次");
console.log("火火视频滑动" + i + '次' + "总计:" + see_count + "次");
closeReturnOrCloseButton();
clickGoldEgg();
randomUpSildeScreen();
randomDownSildeScreen();
randomHeart();
slideScreenDown(device.width / 2, 1500, device.width / 2, 200, 500);
}
home();
function clickGoldEgg() {
if (text("金蛋大奖").exists()) {
let b = text("金蛋大奖").findOne().parent().bounds();
console.log("点击金蛋");
click(b.centerX(), b.centerY());
sleep(400);
let widgetViews = className("android.widget.TextView").find();
if (widgetViews != null) {
widgetViews[1].click();
}
sleep(4000);//关闭按钮3S后才出现
if (id("jh").exists()) {
id("jh").findOnce().click();
}
closeReturnOrCloseButton();
}
sleep(1000);
}
function closeReturnOrCloseButton() {
if (id("jh").exists()) {
id("jh").findOnce().click();
}
}
/**
* 屏幕向下滑动
*/
function slideScreenDown(startX, startY, endX, endY, pressTime) {
swipe(startX, startY, endX, endY, pressTime);
let delayTime = random(6000, 8000);
sleep(delayTime);
}
/**
* 随机上滑(防止被判定是机器)上滑后停留时间至少是10S,造成假象表示是对内容感兴趣
* 点赞和关注先不搞。
*/
function randomUpSildeScreen() {
let randomIndex = random(1, 40);
if (randomIndex == 1) {
console.log("随机上滑被执行了");
pressTime = random(200, 500);
swipe(device.width / 2, 500, device.width / 2, device.height - 200, 700);
delayTime = random(10000, 15000);
sleep(delayTime);
}
}
/**
* 连续下滑对上一个无兴趣
* 其实得和上滑做个排他,既然无兴趣不要在上滑
*/
function randomDownSildeScreen() {
let randomIndex = random(1, 50);
if (randomIndex == 1) {
console.log("连续下滑被执行了");
swipe(device.width / 2, device.height - 200, device.width / 2, 500, 700);
sleep(2000);
swipe(device.width / 2, device.height - 200, device.width / 2, 500, 700);
delayTime = random(8000, 10000);
sleep(delayTime);
}
}
function goPlay() {
if (goPlay = text("继续播放").exists()) {
goPlay.click();
};
}
/**随机点赞并休息一秒 */
function randomHeart() {
index = random(1, 100);
if (index == 66) {
var target = id('good_count_layout').findOnce();
if (target == null) {
return;
} else {
target.click();
sleep(1000);
}
}
}
/**如果弹出青少年窗口,点击 */
function youngWin() {
if (youngWin = text("我知道了").exists()) {
console.log("点击了我知道了(青少年窗口)");
youngWin.click();
};
}