我试图延迟点击第一张图片,因为它在进入屏幕之前就触发了,也许我需要将它放在 if else 语句中?
// Instagram hacks
// Search field
// let Searchtest= prompt("Please enter the hashtag you want to like","Trending");
// var search = document.querySelector('.x3qfX').value = "#" + Searchtest;
document.querySelector(".glyphsSpriteSafari__outline__24__grey_9").click();
let firstPicture = document.querySelector("div._9AhH0");
firstPicture.click();
let likesGiven = 0;
setInterval(() => {
let heart = document.getElementsByClassName(
"glyphsSpriteHeart__outline__24__grey_9"
),
arrow = document.querySelector(".coreSpriteRightPaginationArrow");
if (heart[1]) {
heart = heart[1].parentElement;
likesGiven++, heart.click();
}
arrow.click();
console.log(`You've liked ${likesGiven} post(s)!`);
}, 2000);
// Button Liker
My Last Attempt Run this in your console from instagrams homepage and you u will see what
我是说
document.querySelector(".glyphsSpriteSafari__outline__24__grey_9").click();
let firstPicture = document.querySelector("div._9AhH0");
if (firstPicture){
firstPicture.click();
}
Qyouu
相关分类