--- WWW-SourceForge-0.09-patched/lib/WWW/SourceForge/Project.pm 2005-11-16 11:44:52.000000000 -0800 +++ WWW-SourceForge-0.09/lib/WWW/SourceForge/Project.pm 2005-10-06 20:07:01.000000000 -0700 @@ -47,34 +47,18 @@ my $proj; my $wa = WWW::Mechanize->new( autocheck => 1); $wa->get($url); - my $content = $wa->content or die "Could not retrieve content from '$url'\n"; + my $content = $wa->content; # Wrong project unixname ? if($content =~ m{

Invalid Project

}i) { - warn "Invalid project '$pname'\n"; - return undef; - } elsif ($content =~ m{

Invalid Project

}i) { - warn "Invalid project '$pname'\n"; - return undef; + return; } - - # Project description - my ($desc) = $content =~ m{
-

About .+?

-
- - -

- (.+?) - -

}is; - - # TODO - # my ($meta) = $content =~ m{}s; - - if (! $desc) { warn $content; } + my ($desc,$meta) = $content =~ m{

+[\s\n]* +[\s\n]*
+[\s\n]*

(.+?)

    (.+?)
}s; die "Could not recognize project page format - has SF changed its layout?\n" unless $desc; @@ -99,20 +83,11 @@ } # Parse Track Numbers -# @$proj{'Homepage'} = $content =~ m{ Project Home Page}s; - - @$proj{'oBugs','nBugs'} = $content =~ m{Bugs - - : \(([\d,]+?) open / ([\d,]+?) total\)}is; - @$proj{'oSupports','nSupports'} = $content =~ m{Support Requests - - : \(([\d,]+?) open / ([\d,]+?) total\)}; - @$proj{'oPatches','nPatches'} = $content =~ m{Patches - - : \(([\d,]+?) open / ([\d,]+?) total\)}; - @$proj{'oFeatures','nFeatures'} = $content =~ m{Feature Requests - - : \(([\d,]+?) open / ([\d,]+?) total\)}; + @$proj{'Homepage'} = $content =~ m{ Project Home Page}s; + @$proj{'oBugs','nBugs'} = $content =~ m{Bugs\s+\( (\d+?) open / (\d+?) total \)}; + @$proj{'oSupports','nSupports'} = $content =~ m{Requests\s+\( (\d+?) open / (\d+?) total \)
}; + @$proj{'oPatches','nPatches'} = $content =~ m{Patches\s+\( (\d+?) open / (\d+?) total \)
}; + @$proj{'oFeatures','nFeatures'} = $content =~ m{Feature Requests\s+\( (\d+) open / (\d+) total \)}; # Parse Admin my @admin;