抖音自动点赞脚本!JAVA代码,已打包好
//2019-03-06 //孙教育者 //---------- auto(); setScreenMetrics(480, 800); launchApp("抖音短视频"); sleep(5000); var comment1 = "自定义评头品足情节1"; var comment2 = "自定义评说本末2"; var comment3 = "自定义臧否情节3"; var comment4 = "自定义评介本末4"; var comment5 = "自定义评头品足本末5"; var waitTime = 1000*60 * 60; var date; var commArr = new Array(); if (comment1.length != 0) { commArr.push(comment1); } if (comment2.length != 0) { commArr.push(comment2); } if (comment3.length != 0) { commArr.push(comment3); } if (comment4.length != 0) { commArr.push(comment4); } if (comment5.length != 0) { commArr.push(comment5); } // 任意品头论足前段 var commArr1 = new Array(); commArr1.push("喜性你的视频"); commArr1.push("看了你的视频,真正很闹着玩儿"); commArr1.push("这视频立志了"); commArr1.push("内容过火实事求是"); commArr1.push("2333"); // 肆意评介当间儿 var commArr2 = new Array(); commArr2.push(""); commArr2.push(" 太逗了"); commArr2.push(" 给你点赞"); commArr2.push(" 酷"); commArr2.push(" 牛批"); commArr2.push(" 加油哦"); // 任性评价后段 var commArr3 = new Array(); commArr3.push(""); commArr3.push("."); commArr3.push(".."); commArr3.push("..."); commArr3.push("!"); commArr3.push("!!"); commArr3.push("!!!"); var commArr4 = new Array(); commArr4.push("说得好"); commArr4.push("给你赞"); commArr4.push("允许你"); var pinglun = 1;// 1:先发评头品足, 0:先发私信 var tempInterval; var i = 0; var time1; var time2; var timePrev; var timeNow; var totalTime; var beginTime; var vorTime; var jbRunTime = 0; var jbRunTime2 = 0; var count = 0; var commentCount = 0; var vol = 0; var decition = 0; var customInterval = 15000; var mainActivity = "com.ss.android.ugc.aweme.main.MainActivity"; if (currentActivity() == mainActivity) {// 倘然没在抖音的主页面,则洗脱 toast(">>>>>>>>>>>>本子启动<<<<<<<<<<<<"); sleep(3000); date = new Date(); time1 = date.getTime(); beginTime = time1; vorTime = time1; timeNow = time1; log("开动岁时:" + time1); tempInterval = waitTime; toast("先后开动!"); for (; ;) {// 循环往复起头 i++; sleep(1000); time2 = new Date().getTime(); timePrev = timeNow; timeNow = time2; var oneround = timeNow - timePrev; totalTime = timeNow - beginTime; log("for大循环耗时:" + oneround +" 评头品足数="+count+" 私信数="+commentCount); sleep(10); log("总运行时间:" + Math.floor(totalTime / 60000) + "分钟"); sleep(10); jbRunTime += oneround; jbRunTime2 += oneround; log("品评周期:" + Math.floor(jbRunTime / 60000) + "分钟"); sleep(10); if (pinglun == 0 && jbRunTime >= tempInterval) { pinglun = 1; jbRunTime = 0; log("工夫到了" + Math.floor(tempInterval / 60000) + "分钟,肇端臧否,评论周期归零"); } log("是不是讲评发言:" + pinglun); sleep(10); if (pinglun == 1) {// 跻身评价操作 customInterval = 1000 * 10 + Math.floor((Math.random() * 1000 * 5)); toastLog(Math.floor(customInterval / 1000) + "秒后评头品足"); sleep(customInterval); toastLog("点赞"); Tap(447, 469); sleep(1000); Tap(447, 548); sleep(2000); Tap(215, 770); sleep(1500); var index1 = Math.floor((Math.random() * commArr1.length)); var index2 = Math.floor((Math.random() * commArr2.length)); var index3 = Math.floor((Math.random() * commArr3.length)); var randomComm = commArr1[index1] + commArr2[index2] + commArr3[index3]; if (randomComm == undefined || randomComm.length < 4) { randomComm = "good"; } var index = Math.floor((Math.random() * commArr.length)); log("品评始末:" + index1 + "," + index2 + "," + index3 + "," + index); var ran = Math.floor((Math.random() * 1000)); var finalComm = randomComm + " " + ran + " " + commArr[index]; id("wl").findOne().setText(finalComm); var inputInterval = 250 * finalComm.length; if (inputInterval < 4000) { inputInterval = 4000; } log("输入耗时:" + inputInterval + ", len=" + finalComm.length); sleep(inputInterval);// 踵武用户输入时日,输入速度办不到太快 id("wo").findOne().click();// 点击“付诸” count++; var date1 = new Date(); var currTime = date1.getTime(); var oneDiff = (currTime - vorTime) / 1000; var diffTime = (currTime - beginTime) / 1000; vol = diffTime / count; vorTime = currTime; log("评介轮次:" + count + "\n 品评:" + finalComm + "\n 距上次" + oneDiff + "秒" + "\n 平均速度=" + vol + "秒/条"); if (count % 20 == 0) {// 每20条褒贬后,进来“私信”操作 pinglun = 0;// 切换“私信”模式 tempInterval = waitTime; if (count % 100 == 0) { tempInterval = 1000 * 60 * 60 * 20; } log("waitTime=" + (tempInterval / 60000) + "分钟,