from urllib import urlretrieve
url = 'http://www.netfonds.no/quotes/posdump.php?date=%s%s%s&paper=%s.%s&csv_format=csv'
# N = NYSE
# O = Nasdaq
# A = Amex
ticker = 'IBM'
exchange_sym = 'N'
year = '2015'
month = '11'
day = '02'
urlretrieve (url % (year, month, day, ticker, exchange_sym), 'ibm_i.csv')
from urllib import urlretrieve
url='http://www.netfonds.no/quotes/paperhistory.php?paper=%s.O&csv_format=csv'
urlretrieve(url %'AAPL', 'aapl.csv')