Download or view stock.frink in plain text format
// Program to fetch stock prices. Try the stocktest.frink program for an
// interactive version.
stock[symbol] :=
{
url = "http://finance.yahoo.com/q?s=" + symbol
file = read[url]
if [price] = ( file =~ %r/Last Trade.*?<span id=".*?">(\d+\.\d+)<\/span>/si )
return eval[price + " USD"]
else
return undef
}
Download or view stock.frink in plain text format
This is a program written in the programming language Frink.
For more information, view the Frink
Documentation or see More Sample Frink Programs.
Alan Eliasen was born 20217 days, 17 hours, 11 minutes ago.