Skip to content

Instantly share code, notes, and snippets.

@DrewWeth
Last active August 29, 2015 14:14
Show Gist options
  • Save DrewWeth/8a0a779f88b66620d1d3 to your computer and use it in GitHub Desktop.
Save DrewWeth/8a0a779f88b66620d1d3 to your computer and use it in GitHub Desktop.
Hackathon Hackers Scraper (sorry)
// STEP 1: First import jQuery
// Here's a link to raw jQuery that can be copy/pasted into the console
// http://code.jquery.com/jquery-1.7.1.min.js
// NOTE: You have to have all the comments expanded first.
// STEP 2: copy/paste this. I'm not sure if #u_0_21 will work for everyone.
a = $('div > p:contains("Comment with your e-mail if you want $100")').parent().parent(); $('li div.UFICommentContent span.UFICommentBody', a).each(function(elem){ arr.push($(this).text()); });copy.log(arr);
@DrewWeth
Copy link
Author

DrewWeth commented Feb 6, 2015

My first post used an id. FB's DOM is horrifying to look at and changes their IDs. So I changed it to be more a tad more robust.

Any whose, I made the code more robust. It copies the array into your clipboard. You can then paste it into an editor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment