Last active
September 20, 2020 19:01
-
-
Save B45i/e873d69c926dc26616099e2fb0b16e54 to your computer and use it in GitHub Desktop.
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
const delayPromise = (timeout) => | |
new Promise((resolve) => setTimeout(resolve, timeout)); | |
setInterval(() => { | |
let btns = Array.from( | |
document.querySelectorAll('.sqdOP.L3NKy.y3zKF') | |
).filter((btn) => btn.innerText.toLowerCase() === 'follow'); | |
(btns || []).forEach(async (btn) => { | |
btn.click(); | |
await delayPromise(100000); | |
}); | |
let scrollContainer = document.querySelector('.isgrP'); | |
scrollContainer.scrollTop += 2 * scrollContainer.scrollHeight; | |
}, 10000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment