Created
November 6, 2012 05:06
-
-
Save mohnish/4022693 to your computer and use it in GitHub Desktop.
Scraping the GRE words from Barron's official website
This file contains hidden or 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
| // Grab all the rows with the words | |
| var list = $$('table')[6].querySelectorAll('tr'), i, listLength = list.length, output = []; | |
| // Iterate through all the rows to grab the exact words | |
| for(i = 0; i < listLength; i++) { | |
| output.push(list[i].cells[0].innerHTML.trim()); | |
| } | |
| // Get rid of the top most item in the list since it will be the heading | |
| output.shift(); | |
| // Use chrome's built in copy to clipboard utility to copy to clipboard | |
| // You can also just output the `output` by console.log(output.join('\n')); | |
| // and then manually selecting the text and pasting it somewhere | |
| copy(output.join('\n')); |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Execute this code in your browser console after opening the Barron's wordlist page in Google Chrome.