Last active
January 18, 2024 06:34
-
-
Save mehuylsharma/6f6d7eda86d142ea113137e1bd102011 to your computer and use it in GitHub Desktop.
vercelgetter.js
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
| // my network was bad so I made two sleep() calls | |
| // if your PC/laptop is decent and internet is okay you can shorten them but upto you | |
| const elements = document.querySelectorAll('.geist-container.md-row.lg-row') | |
| const fz = Array.from(elements).filter(r => r.classList.length ===4) | |
| async function sleep(ms) { | |
| return new Promise(resolve => setTimeout(resolve, ms)); | |
| } | |
| let Z = []; | |
| for (let i = 0; i < fz.length; i++) { | |
| let tuple = []; | |
| tuple[0] = fz[i].children[0].children[1].children[0].innerText; | |
| fz[i].children[1].children[0].children[0].children[0].click() | |
| await sleep(2000); | |
| let maxim = fz[i].children[1].children[0].children[0].children[1] | |
| if (maxim) { | |
| tuple[1] = maxim.children[0].children[0].innerText; | |
| } | |
| Z.push(tuple) | |
| await sleep(1500) | |
| console.log(tuple) | |
| } | |
| // if this doesn't work just run it once again after everything's done | |
| const envString = Z.map(([key, value]) => `${key}="${value}"`).join('\n'); | |
| console.log(envString); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment