Skip to content

Instantly share code, notes, and snippets.

@Meandmybadself
Last active January 31, 2022 05:00
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 Meandmybadself/bf685f368000b88ccd96589b1a3d9cd8 to your computer and use it in GitHub Desktop.
Save Meandmybadself/bf685f368000b88ccd96589b1a3d9cd8 to your computer and use it in GitHub Desktop.
Devpost - Get username & skills from participants list
// Get users' names & skills from a devpost participants page.
// eg, https://slack.devpost.com/participants
let output = ''
document.querySelectorAll('div.participant').forEach(el => {
try {
const name = el.querySelector('h5 .user-profile-link').innerText
if (name) {
const skills = [...el.querySelectorAll('span.recognized-tag')].map(el => el.innerText.toLowerCase().replace(/\s+/g, '-'))
if (skills.length) {
output += `@${name.toLowerCase().replace(/\s+/g, '-')} ${skills.map(skill => `+${skill}`).join(' ')}\n`
}
}
} catch (e) {
// console.log('error', el)
}
})
console.log(output);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment