Home Messages Index
[Date Prev][Date Next][Thread Prev][Thread Next]
Author IndexDate IndexThread Index

Re: Nice perl script to determine pagerank

  • Subject: Re: Nice perl script to determine pagerank
  • From: Roy Schestowitz <newsgroups@schestowitz.com>
  • Date: Sat, 23 Apr 2005 15:58:25 +0100
  • Newsgroups: alt.internet.search-engines
  • References: <d4dmao$fa6$2@pita.alt.net>
  • User-agent: KNode/0.7.2
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

[Date Prev][Date Next][Thread Prev][Thread Next]
Author IndexDate IndexThread Index