in reply to Re^3: HTML::TableExtract (parse table column from an HTML page)
in thread HTML::TableExtract (parse table column from an HTML page)
... and this is my HTML code:#!/usr/bin/perl use WWW::Mechanize; use HTML::TableExtract; sub parse { $mech = WWW::Mechanize->new(autocheck => 1); $mech->get("file:///home/cafaro/omertascript/test.html"); $content = $mech->content(); $te = HTML::TableExtract->new(depth => 0); $te->parse($content); $table = $te->first_table_found; $tree = $table->tree; print $tree->cell(0,0); } parse();
<html> <head> <title>test page</title> <head> <body> <table> <tr><td>parse me</td></tr> </table> </body> </html>
|
|---|