Last active
March 29, 2022 21:11
-
-
Save stephenhandley/171b32e298c4ae0f0787d15e30192ae4 to your computer and use it in GitHub Desktop.
how 2 delete yr instagrams
This file contains hidden or 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 select(selector) { | |
return document.querySelector(selector) | |
} | |
function click(selector) { | |
try { | |
const el = select(selector) | |
if (el) { | |
el.click() | |
} | |
} catch (error) { | |
console.error(`selector ${selector} not found`) | |
throw error | |
} | |
} | |
function clickAndWait(selector, timeout) { | |
return new Promise(function (resolve) { | |
click(selector) | |
setTimeout(function () { | |
resolve() | |
}, timeout) | |
}); | |
} | |
async function insta() { | |
const sels = { | |
thumbnail: '.v1Nh3.kIKUG._bz0w a', | |
dots: '.MEAGs button.wpO6b', | |
del: '.mt3GC button.aOOlW.-Cab_', | |
confirm: '.piCib button.aOOlW.-Cab_', | |
} | |
while(true) { | |
await clickAndWait(sels.thumbnail, 1000) | |
await clickAndWait(sels.dots, 1000) | |
await clickAndWait(sels.del, 1000) | |
await clickAndWait(sels.confirm, 2000) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
insta()