The domain provided is invalid #19

rezaalavi opened this Issue Apr 3, 2012 · 2 comments


None yet

2 participants


A simple query for google comes back with a invalid domain error:
PageRankr.backlinks("", :google, :bing)

PageRankr::DomainInvalid: The domain provided is invalid.
from /home/reza/.rvm/gems/ruby-1.9.2-p290/gems/PageRankr-3.1.2/lib/page_rankr/site.rb:15:in rescue in initialize'
from /home/reza/.rvm/gems/ruby-1.9.2-p290/gems/PageRankr-3.1.2/lib/page_rankr/site.rb:10:in
from /home/reza/.rvm/gems/ruby-1.9.2-p290/gems/PageRankr-3.1.2/lib/page_rankr.rb:12:in new'
from /home/reza/.rvm/gems/ruby-1.9.2-p290/gems/PageRankr-3.1.2/lib/page_rankr.rb:12:in
from (irb):3
from /home/reza/.rvm/rubies/ruby-1.9.2-p290/bin/irb:16:in `



The issue is that you need to specify a protocol (i.e. However, the docs do not state that, so I'll leave this ticket open until I fix that. You can see the issue below:

>> u = URI.parse("")
=> #<URI::Generic:0x000001009b9ca8>
=> nil
>> u2 = URI.parse("")
=> #<URI::HTTP:0x000001009a59d8 URL:>
=> ""

Thanks that fixed the problem

@rezaalavi rezaalavi closed this Apr 6, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment