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 16:27:45 +0100
  • Newsgroups: alt.internet.search-engines
  • References: <d4dmao$fa6$2@pita.alt.net> <d4dnt3$1i40$1@godfrey.mcc.ac.uk> <d4doce$k4n$0@pita.alt.net>
  • User-agent: KNode/0.7.2
Ignoramus31514 wrote:

> On Sat, 23 Apr 2005 15:58:25 +0100, Roy Schestowitz
> <newsgroups@schestowitz.com> wrote:
>> 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.
> 
> 
> You have to install WWW::Google::PageRank module. I hope that you have
> root access to your system. If so, do this as root:
> 
> perl -MCPAN -e shell
> 
> that sets up the CPAN module, which enables you to easily load other
> modules.
> 
> After it is set up, in that prompt, type
> 
> install WWW::Google::PageRank
> 
> Knowing how to set up extra modules is a highly valuable skill.
> 
> i

======
Running get for module WWW::Google::PageRank
  MD5 Checksum was ok
gzip: yes/sources/authors/id/Y/YK/YKAR/WWW-Google-PageRank-0.09.tar.gz: No
such file or directory
gzip: yes/sources/authors/id/Y/YK/YKAR/WWW-Google-PageRank-0.09.tar.gz: No
such file or directory
/bin/tar: yes/sources/authors/id/Y/YK/YKAR/WWW-Google-PageRank-0.09.tar.gz:
Cannot open: No such file or directory
/bin/tar: Error is not recoverable: exiting now
Using Tar:/bin/tar xvf
yes/sources/authors/id/Y/YK/YKAR/WWW-Google-PageRank-0.09.tar.gz:
/bin/tar: yes/sources/authors/id/Y/YK/YKAR/WWW-Google-PageRank-0.09.tar.gz:
Cannot open: No such file or directory
/bin/tar: Error is not recoverable: exiting now
Couldn't untar
yes/sources/authors/id/Y/YK/YKAR/WWW-Google-PageRank-0.09.tar.gz
======

I've lost the will to continue. I can't bother finding out and specifying
paths. The whole thing will be hard and immobile. It would have been
excellent if I could move the script from one machine to another or share
it. It is just not self-contained in my opinion.

Roy

-- 
Roy S. Schestowitz
http://Schestowitz.com

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