Skip to content

Instantly share code, notes, and snippets.

@mohnish
Created November 6, 2012 05:06
Show Gist options
  • Select an option

  • Save mohnish/4022693 to your computer and use it in GitHub Desktop.

Select an option

Save mohnish/4022693 to your computer and use it in GitHub Desktop.
Scraping the GRE words from Barron's official website
// 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'));
@mohnish

mohnish commented Nov 6, 2012

Copy link
Copy Markdown
Author

Execute this code in your browser console after opening the Barron's wordlist page in Google Chrome.

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