Skip to content

Instantly share code, notes, and snippets.

@dasginganinja
Last active August 29, 2015 13:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dasginganinja/9957827 to your computer and use it in GitHub Desktop.
Save dasginganinja/9957827 to your computer and use it in GitHub Desktop.
Canadian FSA Retrieval from WIkipedia. Provides a comma delimited list. Example URL: http://en.wikipedia.org/wiki/List_of_B_postal_codes_of_Canada
(function($) {
var fsas = [];
$('table td:not([style]) b').each(
function() {
var val = $(this).text();
if (val.length == 3) {
fsas.push(val);
}
});
var csv = fsas.sort().join(',');
console.log(csv);
})(jQuery);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment