Is there a way to check google rank of page (not domain)? #12

ronald opened this Issue Nov 25, 2011 · 5 comments


None yet

2 participants

ronald commented Nov 25, 2011


thanks a lot for the gem!

I'd like to check page rank of a single (sub) page.

This is what I got:
bundle exec rails runner "puts'').run" => 7
bundle exec rails runner "puts'').run" => nil

This is what I expected:
bundle exec rails runner "puts'').run" => 7
bundle exec rails runner "puts'').run" => 5

The only way I found to get the results is to overriding a method

# force loading in development

# do override
def PageRankr::Site(site)

Is there a better way?

By the way: Ruby 1.8.7, PageRankr 3.0.2


blatyo commented Nov 26, 2011

Yea, the Site class could use some love. Right now, it's basically stripping out everything except the domain and subdomain stuff. I did that originally to fix some issues with Alexa returning the wrong value if a subdomain is provided (it'll ignore the path). Site should probably store the protocol, path, parameters, and hash parameters and each tracker should determine what level of specificity is usable.

ronald commented Nov 27, 2011

Thanks for clarifying.

Unforunatly I don't have the time to fork right now.

If you plan to implement this you could use ruby's URI classes

require 'uri'
uri = URI.parse('')
puts{|c| "#{c}: #{uri.send(c)}" }

scheme: http
port: 80
path: /some/file
query: param1=foo
fragment: bar

@blatyo blatyo was assigned Nov 27, 2011
blatyo commented Dec 12, 2011

Just as an update, I've started work on this, but there are some issues when I run the specs that I haven't worked out yet.


blatyo commented Dec 26, 2011

3.1.0 should fix this.

@blatyo blatyo closed this Dec 26, 2011
ronald commented Dec 26, 2011

Great. Thanks a Lot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment