Hello All,
Could some one help me with stripping out the following from the
following HTML?
<tr>
<td><b>Find this one</b> </td>
<td><tt>one 1</tt> </td>
</tr>
<tr>
<td><b>Find this two</b> </td>
<td><tt>two 2</tt> </td>
</tr>
<tr>
<td><b>Find this three</b> </td>
<td><tt>three 3</tt> </td>
</tr>
Basically using HTML::TableExtract I really want to extract....
one 1
two 2
three 3
So far I have the following code...
$inputSite = "<URL>";
$tree = HTML::TreeBuilder->new;
$address = "http://" . $inputSite;
$request = HTTP::Request->new('GET', $address);
$response = $ua->request($request);
my $found = 0;
$tree->parse($response->content);
$html_string = $tree->as_HTML;
$te = new HTML::TableExtract( headers => [qw(one two three)] );
$te->parse($html_string);
foreach $ts ($te->table_states) {
foreach $row ($ts->rows) {
$mRow = "@$row";
}
}
print $mRow;
Is there any obvious errors in this?
Regards,
Dan
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]