Last active
February 22, 2023 02:51
-
-
Save benawad/ae22e414ce7e73c094cacfd2053c2b81 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
function clickAccept() { | |
document.querySelectorAll('button.artdeco-button--secondary').forEach(b => { | |
if (b.innerText.includes('Accept')) { | |
b.click() | |
} | |
}); | |
} | |
function loadMore() { | |
document.querySelector('button.artdeco-button--icon-right').click() | |
}; | |
const sleep = (ms) => new Promise(res => setTimeout(res, ms)) | |
for (let i = 0; i < 10; i++) { | |
clickAccept(); | |
loadMore(); | |
await sleep(5000) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment