participate


Java Programming - Getting the PageRank
This question is not answered.

<<   Back to Forum  |   Give us Feedback
This topic has 2 replies on 1 page.
alley
Posts:90
Registered: 11/6/07
Getting the PageRank   
Nov 7, 2009 9:21 AM
 
 
Hi,

I need to retrieve the PageRank of some websites. I've searched and it seems the only way it can be retrieved is through the Google toolbar.

I've now installed this toolbar, and the PageRank shows as a 'mouse over' text from the relative button on the toolbar.

Can you please tell me some approach and/or classes I need to use to extract this rank through Java code? Is there some class that can read toolbar contents?

Thanks.
 
alley
Posts:90
Registered: 11/6/07
Re: Getting the PageRank   
Nov 7, 2009 11:01 AM (reply 1 of 2)  (In reply to original post )
 
 
Meanwhile, I found a package for my purposes: http://www.temesoft.com/google-pagerank-api.jsp

However, I'm getting this error when I run it:

java.net.SocketException: Connection reset
	at java.net.SocketInputStream.read(SocketInputStream.java:168)
	at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
	at java.io.BufferedInputStream.read1(BufferedInputStream.java:258)
	at java.io.BufferedInputStream.read(BufferedInputStream.java:317)
	at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:666)
	at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:611)
	at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:631)
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1000)
	at PageRankService.getPR(PageRankService.java:79)
	at PageRankService.main(PageRankService.java:109)
	at __SHELL0.run(__SHELL0.java:7)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at bluej.runtime.ExecServer$3.run(ExecServer.java:792)


Does anyone knows what it means?
 
DrClap
Posts:38,751
Registered: 4/30/99
Re: Getting the PageRank   
Nov 7, 2009 11:16 AM (reply 2 of 2)  (In reply to #1 )
Helpful
 
It means the server disconnected rather than responding to your request.

This may be by design; if it's a Google site you're connecting to then most likely the terms of service don't permit bots.
 
This topic has 2 replies on 1 page.
Back to Forum
 
Read the Developer Forums Code of Conduct

Click to email this message Email this Topic

Edit this Topic
  
 
 
Forums Statistics
    Users Online : 29
  • Guests : 131

About Sun forums
  • Sun Forums is a large collection of user generated discussions. It is here to help you ask questions, find answers, and participate in discussions.

    Check out our guide on Getting started with Sun Forums for a full walkthrough of how to best leverage the benefits of this community.

Powered by Jive Forums