Skip to content

Instantly share code, notes, and snippets.

@jokester
Last active December 16, 2015 14:39
Show Gist options
  • Save jokester/5450023 to your computer and use it in GitHub Desktop.
Save jokester/5450023 to your computer and use it in GitHub Desktop.
JS snippet to extract Chinese family names from wikipedia.
// http://zh.wikipedia.org/wiki/%E7%99%BE%E5%AE%B6%E5%A7%93
JSON.stringify(
$.makeArray(
$("table.wikitable td:nth-child(2)").map( function(_,node){ return node.textContent; } )
)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment