Skip to content

Instantly share code, notes, and snippets.

@GitHub30
Last active May 26, 2019 17:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GitHub30/87a0978552ccedc6be1abf47c521d346 to your computer and use it in GitHub Desktop.
Save GitHub30/87a0978552ccedc6be1abf47c521d346 to your computer and use it in GitHub Desktop.
sleep=s=>new Promise(r=>setTimeout(r,1e3*s)) // await sleep(1)
var urls = $$('body > div.allWrapper > div.p-organization_wrapper > div.p-organization_container > div > div:nth-child(2) > section > div > ul > li > a').map(a => a.href)
urls.forEach(async (u, i) => {
await sleep(i)
var doc = new DOMParser().parseFromString(await fetch(u).then(r => r.text()), "text/html")
var a = doc.querySelector('a[href^="https://github.com/"]')
if(a) console.log(a.href)
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment