Possible Duplicate:
How can you search Google Programmatically Java API
I need to extract URLs in google search results using Java. The first step I did is to use a code that extracts the whole html page text.
Unfortunately, this code didn't work with google. Is there any solutions to extract urls from google results page using java code? I've read about google custom search API. My question is: Is it possible to use this with Java ?? Any clues ?
URL url = new URL("http://type the search result url here");
URLConnection connection = url.openConnection();
connection.setDoInput(true);
InputStream inStream = connection.getInputStream();
BufferedReader input =
new BufferedReader(new InputStreamReader(inStream));
String line = "";
while ((line = input.readLine()) != null)
System.out.println(line); </i>