Skip to content

Instantly share code, notes, and snippets.

@emiremen
Last active December 28, 2020 15:02
Show Gist options
  • Save emiremen/8f481470689557cbca685626f74ed391 to your computer and use it in GitHub Desktop.
Save emiremen/8f481470689557cbca685626f74ed391 to your computer and use it in GitHub Desktop.
Instagram AutoFollow with JavaScript
setInterval(function onDkdaBirCalis(){
var sayi = 0;
/* Gonderi acma */
setTimeout(function(){
var gonderi = document.querySelectorAll(".NUiEW")[sayi].children[0];
gonderi.click();
/* Begenenleri acma */
setTimeout(function(){
/* Begenenler yoksa yenisini ac */
if(document.getElementsByClassName('vcOH2')[0]){
/* Acilan Gonderiyi Kapatma */
setTimeout(function(){
var btn_kapat = document.querySelectorAll(".yiMZG")[0].children[0];
btn_kapat.click();
}, 5000);
sayi++;
gonderi.click();
}
var btn_begenenler = document.getElementsByClassName('Nm9Fw')[0].getElementsByClassName('_8A5w5')[0];
btn_begenenler.click();
/* Oto Takip */
setTimeout(function(){
var takipButonlari = document.getElementsByClassName('sqdOP L3NKy y3zKF');
kaydir();
function kaydir(){
setTimeout(function(){
document.querySelector(".i0EQd").firstElementChild.scrollBy(0,800);
console.log("Kaydır Çalıştı");
}, 1000);
setTimeout(function(){
if(takipButonlari.length < 17){
kaydir();
}
else{
takipEt();
}
}, 1000);
}
function takipEt(){
var takipButonlari = document.getElementsByClassName('sqdOP L3NKy y3zKF');
for(var i=0; i < 17; i++)
{
if(takipButonlari[i].innerHTML =="Takip Et")
{
takipButonlari[i].click();
console.log("Takip Et Çalıştı");
}
}
}
/* Acilan Gonderiyi Kapatma */
setTimeout(function(){
var btn_kapat = document.querySelectorAll(".yiMZG")[0].children[0];
btn_kapat.click();
}, 5000);
}, 3000);
}, 3000);
}, 3000);
sayi++;
}, 1000*10);
/* #################################################################### */
/* For spesific post followers (begenenler penceresi acik olmali )*/
var takipButonlari = document.getElementsByClassName('sqdOP L3NKy y3zKF');
setInterval(function onDkdaBirCalis(){
kaydir();
}, 1000);
function kaydir(){
setTimeout(function(){
document.querySelector(".i0EQd").firstElementChild.scrollBy(0,800);
console.log("Kaydır Çalıştı");
}, 1000);
setTimeout(function(){
if(takipButonlari.length < 17){
kaydir();
}
else{
takipEt();
}
}, 1000*10);
}
function takipEt(){
var takipButonlari = document.getElementsByClassName('sqdOP L3NKy y3zKF');
for(var i=0; i < 17; i++)
{
if(takipButonlari[i].innerHTML =="Takip Et")
{
takipButonlari[i].click();
console.log("Takip Et Çalıştı");
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment