Skip to content

Instantly share code, notes, and snippets.

@serradura
Last active September 25, 2017 21:57
Show Gist options
  • Save serradura/7d5ce5ad96c1dfc0ca5d6e94ff0b5f35 to your computer and use it in GitHub Desktop.
Save serradura/7d5ce5ad96c1dfc0ca5d6e94ff0b5f35 to your computer and use it in GitHub Desktop.
artoo.js meetup.com attendees scraper
// Dependency: https://medialab.github.io/artoo/
// Recommendation: Use the script with Google Chrome DevTools console.
let attendees;
attendees = $('.attendee-item').map(function(_index, attendee) {
const $attendee = $( attendee );
const $avatar = $attendee.find('a.avatar');
const image = $avatar.css('background-image').match(/"(.*)"/i)[1];
const profile = $avatar.attr('href');
const name = $attendee.find('h4').text();
let question, answer;
const $answers = $attendee.find('.attendee-item-answers');
if ( $answers.length ) {
question = $answers.find('dt').text();
answer = $answers.find('dd').text();
}
return { name, image, profile, question, answer };
}).get()
artoo.saveCsv(attendees, 'meetup-attendees.csv');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment