#We'll use this to explore in detail #the format of the web page returned by Yahoo! finance, #when we request a stock price. from urllib import * def getStockPrice(stock_code): webstream=urlopen("http://finance.yahoo.com/q?s="+stock_code) results=webstream.readlines() webstream.close() for j in range(0,len(results)): print j,"\t"+results[j]+"\n\n"