Randal

Would the same be possible for generating dynamic queries of web pages like
amazon.

cheers
                        Saurabh Bansal

                BTexact Technologies is a trademark of British
Telecommunications plc
                Registered office: 81 Newgate Street London EC1A 7AJ
                Registered in England no. 1800000

This electronic message contains information from British Telecommunications
plc which may be privileged or confidential. The information is intended to
be for the use of the individual(s) or entity named above. If you are not
the intended recipient be aware that any disclosure, copying, distribution
or use of the contents of this information is prohibited. If you have
received this electronic message in error, please notify us by telephone or
email (to the numbers or address above) immediately.


        -----Original Message-----
        From:   [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]]
        Sent:   Tuesday, June 19, 2001 11:43 PM
        To:     Craig Westerman
        Cc:     beginners
        Subject:        Re: Extracting data from a web page

        >>>>> "Craig" == Craig Westerman <[EMAIL PROTECTED]> writes:

        Craig> I posted the following on the
        Craig> [EMAIL PROTECTED] list without getting a reply. Posting
here in hopes
        Craig> of getting a clue where to start. Thanks in advance.

        Craig> --------------------------------------------

        Craig> Microsoft Excel has the ability to import data via a web
query. If I create
        Craig> a query and run it on the following URL, a table with stock
price
        Craig> information will be displayed on an Excel worksheet.
        Craig> http://finance.yahoo.com/q?s=%5EIXIC+%5EDJI+RHAT++&d=v1 If I
run the query
        Craig> again the next day the data will be updated in the same
        Craig> cell locations. Thus I can collect this data over a period of
time and
        Craig> create a chart using the chart feature of MS Excel.

        Craig> Now to the Perl/CGI question. What techniques and functions
would I use in
        Craig> Perl to retrieve data from the above URL and save to a comma
delimited data
        Craig> file?

        The data is a lot nicer if you do this:

            use LWP::Simple;
            my $out = "-"; # stdout for demo
            getstore
"http://finance.yahoo.com/d/quotes.csv?s=^IXIC+^DJI+RHAT&f=sl1d1t1c1ohgv&e=.
csv", $out;

        See the "download spreadsheet" link?  That's a good clue that you
don't
        have to learn HTML. :)

        Also see Finance::Yahoo::StockQuote or something like that.

        -- 
        Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503
777 0095
        <[EMAIL PROTECTED]> <URL:http://www.stonehenge.com/merlyn/>
        Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
        See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl
training!

Reply via email to