canguro has asked for the wisdom of the Perl Monks concerning the following question:
I am also wondering if I can somehow 'grab' (save) the literal "Earnings Announcements for: Friday, May 2, 2003" which displays as a title above the table, since the date is crucial. Here is the code I have built so far:a1, a2, a3, a4 b1, b2, b3, b4 . . .
Many thanks#!/usr/bin/perl use warnings; use strict; use LWP::Simple; use HTML::TableExtract; my $url; $url="http://www.earnings.com/fin/earnListing.jsp?tckr=&exch=&eff=&dat +e=2003-05-04"; my $content=get $url; my $te = new HTML::TableExtract( headers => [qw(Company Symbol Estimate Actual)] ); $te->parse($content); # Examine all matching tables foreach my $ts ($te->table_states) { print "Table (", join(',', $ts->coords), "):\n"; foreach my $row ($ts->rows) { print join(',', @$row), "\n"; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Able to Access Table Data But Not Sure How to Display Columns in Row Format
by Abstraction (Friar) on May 10, 2003 at 04:51 UTC | |
|
Re: Able to Access Table Data But Not Sure How to Display Columns in Row Format
by CountZero (Bishop) on May 09, 2003 at 22:39 UTC |