Ignoramus31514 wrote:
> Wrote it last night.
>
> use from unix prompt:
>
> $ pagerank http://my.web.site/mydir/page.html
>
> It adds http:// if it is missing.
> ======================================================================
>
> #!/usr/bin/perl
>
> use WWW::Google::PageRank;
>
> sub clean {
> my $x = shift @_;
> return $x if $x =~ /^http:/;
> $x = "http://$x" if $x =~ /^\w/;
> $x = "http://www.algebra.com$x" if $x =~ /^\//;
> return $x;
> }
>
> my $pr = WWW::Google::PageRank->new;
> if( $#ARGV == 0 ) {
> print $pr->get(clean(@ARGV[0])) . "\n";
> } else {
> foreach my $site (@ARGV) {
> print "$site " . $pr->get(clean($site)), "\n";
> }
> }
Can't locate WWW/Google/PageRank.pm in @INC (@INC contains:
/usr/lib/perl5/5.8.0/i586-linux-thread-multi /usr/lib/perl5/5.8.0
/usr/lib/perl5/site_perl/5.8.0/i586-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl .) at gpr.pl line
3.
BEGIN failed--compilation aborted at gpr.pl line 3.
Are you sure it works under most variants without dependency issues?
This script has great potential and will fit well alongside John Bokma's
Google Suggest script. I want to output all PR and GSuggest figures of
interest onto a text file overnight.
Roy
--
Roy S. Schestowitz
http://Schestowitz.com
|
|