extract the parsing of the html into its own sub

mostly for testing purposes
main
Yanick Champoux 2023-08-26 12:50:17 -04:00
parent 3afc4a6925
commit acc6a64388
1 changed files with 7 additions and 2 deletions

View File

@ -37,13 +37,18 @@ sub get_mersenne_results() {
# load the results into a table object
my $html_string = $mech->content;
$html_string =~ s/\n//g;
return extract_first_table($html_string);
}
sub extract_first_table($html) {
$html =~ s/\n//g;
my $te = HTML::TableExtract->new( depth => 0, count => 2 );
$te->parse($html_string);
$te->parse($html);
return $te->first_table_found;
}
sub generate_output_table ($ts) {