🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.internet.web
Article #1212

Re: Help me grab stock data from Yahoo Finance

#1212
From: Hans Galema
Date: Sat, 27 Aug 2005 11:25
22 lines
1989 bytes
LarryJ wrote:

> The link below loads stock data into an HTML Table
> http://table.finance.yahoo.com/d?s=IBM&a=6&b=31&c=2005&d=7&e=27&f=2005&g=d

If you do a 'View Source' for that page you can see that
the whole table is on one line. Starting with:
</FORM><table border=1 cellpadding=4 cellspacing=0 width=100%> <tr bgcolor='#dcdcdc'><td align=center><b>Date</b></td>...
and ending with:
          ....<td align=right><nobr>83.23</nobr></td></tr></table>....

Knowing that, you can place that line in an AnsiString and then use
the Pos() method to find the data and parse them out.

> The link below loads the stock data into a spreadsheet
> http://itable.finance.yahoo.com/table.csv?a=7&b=27&c=2004&d=7&e=27&f=2005&s=has&y=0&g=d&ignore=.csv

Here (with Thunderbird and Firefox) it does not. You just get a table.csv file.
Just the kind of file you want to make yourself. Also with TNMHTTP or TIdHTTP
and a simple GET you will get the csv data.

Hans.
Technical Details
Message-ID: <43104d6e@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!news.moat.net!news-out.newsfeeds.com!propagator3-LAX.newsfeeds.com!news-in.spamkiller.net!news-in.superfeed.net!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <43103138@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: feeec,7f6dec7a9aa0e3d9
X-Google-Attributes: gidfeeec,public
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Sat, 27 Aug 2005 13:25:00 +0200
From: Hans Galema <notused@notused.nl>
User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206)
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.internet.web
Subject: Re: Help me grab stock data from Yahoo Finance
References: <43103138@newsgroups.borland.com>
In-Reply-To: <43103138@newsgroups.borland.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 129.125.201.248
Message-ID: <43104d6e@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1125141870 129.125.201.248 (27 Aug 2005 04:24:30 -0700)
Lines: 22
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!news.moat.net!news-out.newsfeeds.com!propagator3-LAX.newsfeeds.com!news-in.spamkiller.net!news-in.superfeed.net!caladan.landsraad.net!newsgroups.borland.com!not-for-mail