Last active
August 29, 2015 14:14
-
-
Save DrewWeth/8a0a779f88b66620d1d3 to your computer and use it in GitHub Desktop.
Hackathon Hackers Scraper (sorry)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.