Last active
February 27, 2024 16:30
-
-
Save zone0119/0034dd278926065925ec5e26743b5de0 to your computer and use it in GitHub Desktop.
instalike.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Open GOOGLE press F12 -> put CODE to console, open insta POST | |
var countL = 0; | |
if (location.href == 'https://www.instagram.com/') | |
{ | |
function mF() { | |
var minSec = 3, | |
maxSec = 7; | |
var rand = Math.floor(Math.random() * (maxSec - minSec + 1) + minSec); //Generate Random number between 3 - 7 | |
var likes = document.querySelectorAll('._aamw'); | |
for (var i = 0; i < likes.length; i++) { | |
likes[i].querySelector("div[role='button']").click(); | |
countL++ | |
} | |
console.log("countL=" + countL); | |
window.scrollBy(0, 550); | |
setTimeout(mF, rand * 1000); | |
} | |
mF(); | |
} | |
else | |
{ | |
var count = 1; | |
function f() { | |
let like = document.getElementsByClassName('_aamw'); | |
console.log(like[0]); | |
like[0].querySelector("div[role='button']").click(); | |
countL++ | |
var minSec = 6, | |
maxSec = 20; | |
var rand = Math.floor(Math.random() * (maxSec - minSec + 1) + minSec); //Generate Random number between 5 - 10 | |
console.log('Wait for ' + rand + ' seconds'); | |
var next = document.querySelector('._aaqg'); | |
next.querySelector('button').click(); | |
console.log(count + " - next" + next); | |
delete next; | |
console.log("countL=" + countL); | |
setTimeout(f, rand * 1000); | |
} | |
f() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
// only like comment
//this code only likes comments, if you need posts then above code works
//Open GOOGLE press F12 -> put CODE to console, open insta POST
// 130723 they changed the address attribute like[0].querySelector("div[role='button']").click();
var countL = 0;
if (location.href == 'https://www.instagram.com/')
{
var likes = document.querySelectorAll('._aamf');
for (var i = 0; i < likes.length; i++) {
}
console.log("countL=" + countL);
setTimeout(mF, rand * 1000);
}
mF();
}
else
{
let like = document.getElementsByClassName('_aamf');
console.log(like[0]);
like[0].querySelector("div[role='button']").click();
countL++
var minSec = 6,
maxSec = 20;
var rand = Math.floor(Math.random() * (maxSec - minSec + 1) + minSec); //Generate Random number between 5 - 10
console.log('Wait for ' + rand + ' seconds');
var next = document.querySelector('._aaqg');
next.querySelector('button').click();
console.log(count + " - next" + next);
delete next;
console.log("countL=" + countL);
setTimeout(f, rand * 1000);
}
}