Selamun Aleyküm dostlar,
Önce su sayfaya giriyoruz:
https://www.instagram.com/accounts/h...and_live_from/
Önce sayfayı tamamen aşağı indiriyoruz ki tüm kişiler yüklensin.
Kimse seçili olmaması lazım ki işaretli olanları kaldırmasın.
chrome console yi açıyoruz ve aşağıda ki kodu yapıştırıyoruz.
(async () => {
const delay = ms => new Promise(r => setTimeout(r, ms));
console.log("Başlıyor...");
let lastHeight = 0;
let sameCount = 0;
// Scroll yaparak tüm kullanıcıları yükle
for (let i = 0; i < 100; i++) {
window.scrollTo(0, document.body.scrollHeight);
await delay(1500);
let newHeight = document.body.scrollHeight;
if (newHeight === lastHeight) {
sameCount++;
} else {
sameCount = 0;
}
lastHeight = newHeight;
if (sameCount >= 3) break;
}
console.log("Tüm liste yüklenmeye çalışıldı.");
// Checkboxları bul
const buttons = [...document.querySelectorAll('div[role="button"]')];
let clicked = 0;
for (const btn of buttons) {
const aria = btn.getAttribute("aria-pressed");
// Seçili değilse tıkla
if (aria === "false" || aria === null) {
btn.click();
clicked++;
await delay(80);
}
}
console.log(`${clicked} kişi gizlendi.`);
})();