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
# original link found here: https://gis.stackexchange.com/questions/1047/seeking-full-list-of-iso-alpha-2-and-iso-alpha-3-country-codes | |
import csv | |
import urllib.request as urllib2 | |
from bs4 import BeautifulSoup | |
import sys | |
# helper function to get text and anchor tag text | |
# this removes the new line characters, connects all the elements of the column | |
def format_text(array): | |
return ''.join(array).strip() |