You've got the basic bits, but you've put them together the wrong way and there's a lot of stuff missing. Here's a starting point:
use strict; use warnings; use LWP::Simple; use HTML::TableExtract; my $money = get("http://finance.yahoo.com/q/ks?s=MNDO+Key+Statistics") +; my $p = new HTML::TableExtract(); $p->parse($money); my $table = $p->table(2, 0); for my $row ($table->rows ()) { ! defined and $_ = ' ' for @$row; print "@$row\n"; }
Prints:
Market Cap (intraday)5: 57.14M Enterprise Value (Mar 2, 2011)3: 39.06M Trailing P/E (ttm, intraday): 11.88 Forward P/E (fye Dec 31, 2012)1: N/A PEG Ratio (5 yr expected)1: N/A Price/Sales (ttm): 2.91 Price/Book (mrq): 2.41 Enterprise Value/Revenue (ttm)3: 1.96 Enterprise Value/EBITDA (ttm)3: 5.95
In reply to Re: Help With Online Table Scraper
by GrandFather
in thread Help With Online Table Scraper
by jdlev
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |