淘看点不建议刷,原因很简单金币少,Tx费劲。
auto.waitFor(); let see_count = rawInput('请输入滑动次数', '3000'); app.launchApp('淘看点'); sleep(6000); console.show(); //开启日志(悬浮窗权限)淘看点 closeAd(); for (var i = 1; i < see_count; i++) { toast("淘看点滑动" + i + "次" + "总计:" + see_count + "次"); console.log("淘看点滑动" + i + "次" + "总计:" + see_count + "次"); closeGoderEgg(); randomUpSildeScreen(); randomDownSildeScreen(); randomHeart(); randomFollow(); slideScreenDown(303, 1328, 335, 171, 600); } //关闭当前程序 exit(); home(); function closeGoderEgg() { if (id("close_bottom_button").exists()) { try{ console.log("关闭金丹"); id("close_bottom_button").findOnce().click(); }catch(e){ console.log(e); } } } function closeAd() { if (id("btn_back").exists()) { try{ console.log("关闭广告"); id("btn_back").findOne().click(); id("close_bottom_button").findOnce().click(); }catch(e){ console.log(e); } } } /**如果弹出青少年窗口,点击 */ function youngWin() { if (youngWin = text("我知道了").exists()) { console.log("点击了我知道了(青少年窗口)"); youngWin.click(); }; } /** * 随机上滑(防止被判定是机器)上滑后停留时间至少是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, 60); 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, 300); delayTime = random(8000, 10000); sleep(delayTime); } } /**随机点赞并休息一秒 */ function randomHeart() { index = random(1, 10); if (index == 1) { console.log("随机点赞并休息一秒"); // id("video_detail_recyclerview").className("android.support.v7.widget.RecyclerView").scrollable(true).findOne().children().forEach(child => { // var target = child.findOne(id("ll_like_show_btn")); // target.click(); // sleep(1000); // }); } } /** * 随机关注 */ function randomFollow() { index = random(1, 100); if (index == 66) { console.log("随机关注并休息一秒"); var target = id('attention').findOnce(); if (target == null) { return; } else { target.click(); sleep(1000); } } }