Skip to content

Instantly share code, notes, and snippets.

@piroor
Created February 6, 2020 01:54
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 piroor/426fd86aca3d3d05d3996941f0b8c80f to your computer and use it in GitHub Desktop.
Save piroor/426fd86aca3d3d05d3996941f0b8c80f to your computer and use it in GitHub Desktop.
Find AWS/Amazon developers from contributors
// Run this script with the web console for contributors list pages on your Web browser, for example:
// https://github.com/antirez/redis/graphs/contributors
// https://github.com/mongodb/mongo/graphs/contributors
// https://github.com/apache/kafka/graphs/contributors
(async () => {
let promises = [];
for (const url of Array.from(new Set(Array.from(document.querySelectorAll('a[href][data-hovercard-type="user"]'), link => link.href)))) {
const win = window.open(url);
promises.push(new Promise(resolve => {
win.addEventListener('DOMContentLoaded', () => {
resolve();
if (!win.document.querySelector('div[itemtype="http://schema.org/Person"]').textContent.match(/AWS|Amazon/))
win.close();
}, { once: true });
}));
if (promises.length > 10) {
await Promise.all(promises);
promises = [];
}
}
await Promise.all(promises);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment