Last active
August 29, 2015 13:58
-
-
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
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
(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