extract the parsing of the html into its own sub
mostly for testing purposes
This commit is contained in:
parent
3afc4a6925
commit
acc6a64388
@ -37,13 +37,18 @@ sub get_mersenne_results() {
|
|||||||
# load the results into a table object
|
# load the results into a table object
|
||||||
my $html_string = $mech->content;
|
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 );
|
my $te = HTML::TableExtract->new( depth => 0, count => 2 );
|
||||||
|
|
||||||
$te->parse($html_string);
|
$te->parse($html);
|
||||||
|
|
||||||
return $te->first_table_found;
|
return $te->first_table_found;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sub generate_output_table ($ts) {
|
sub generate_output_table ($ts) {
|
||||||
|
Loading…
Reference in New Issue
Block a user