Results 1 to 3 of 3

Thread: PERL Script to Show PageRank

  1. #1
    Will.Spencer's Avatar
    Will.Spencer is offline Retired
    Join Date
    Dec 2008
    Posts
    5,033
    Blog Entries
    1
    Thanks
    1,010
    Thanked 2,329 Times in 1,259 Posts

    PERL Script to Show PageRank

    This little PERL script has saved me a lot of time when I want to find the PR of a large number of URL's.

    Here's the code:
    Code:
    #!/usr/bin/perl
    use locale;
    use WWW::Google::PageRank;
    my $pr = WWW::Google::PageRank->new();
    my $url = shift;
    my $rank = $pr->get($url);
    print "PageRank: " .  $rank . " " . $url . "\n";
    I call the script pr.pl and I run it like this:
    Code:
    $ pr.pl http://www.netbuilders.org
    PageRank: 3 http://www.netbuilders.org
    But more frequently, I run it from within another script -- one that contains a list of hundreds of URL's that I want to check painlessly.

    Then, I often run the output through the `sort` command to highlight the URL's with higher PageRank values.
    Submit Your Webmaster Related Sites to the NB Directory
    I swear, by my life and my love of it, that I will never live for the sake of another man, nor ask another man to live for mine.

  2. #2
    ankit is offline Net Builder
    Join Date
    Mar 2009
    Location
    India
    Posts
    133
    Thanks
    25
    Thanked 17 Times in 14 Posts
    looks great

    can it be modified in some way to use it for getting PR of inner pages too somehow like the tool by seojunkie which fetches pr of all inner pages indexed in google for the particular url

  3. #3
    Will.Spencer's Avatar
    Will.Spencer is offline Retired
    Join Date
    Dec 2008
    Posts
    5,033
    Blog Entries
    1
    Thanks
    1,010
    Thanked 2,329 Times in 1,259 Posts
    It get's the PageRank of an inner page if you ask it to, but it doesn't find all of the inner pages for you.

    It's PERL, of course, so it can be modified to do almost anything. The easy thing would be to connect it up to another script, like `wget`. You could use wget to get the list of pages and then this script to get the PageRank.
    Submit Your Webmaster Related Sites to the NB Directory
    I swear, by my life and my love of it, that I will never live for the sake of another man, nor ask another man to live for mine.

Similar Threads

  1. Show If
    By Will.Spencer in forum Monetizing
    Replies: 0
    Last Post: 18 March, 2011, 18:46 PM
  2. Youtube script show my channel
    By thesyndicate in forum Programming
    Replies: 4
    Last Post: 18 April, 2010, 22:34 PM
  3. [WTS] 100% auto Watch Movies/Tv show Script
    By drunk in forum Scripts
    Replies: 0
    Last Post: 19 February, 2010, 00:13 AM
  4. #!/usr/bin/perl -w print "Hello, world.\n";
    By jmburman in forum Introduction Forum
    Replies: 3
    Last Post: 13 January, 2010, 09:59 AM
  5. Did you get to learn PERL?
    By ruben in forum Web Design
    Replies: 4
    Last Post: 28 November, 2009, 08:25 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •