Regarding Google Adwords API

Hi Friends,

I have a requirement of getting the sponsored links from the Google search page. I tried it using a URL class, I could get the whole page, but my requirement is to get the URLs of all the Sponsored Links in the Google Page . I am posting my code here,

import java.net.*;

import java.io.*;

public class Parsing

{

public static void main(String args[]) throws Exception

{

String line = null;

StringBuffer sb1=new StringBuffer();

BufferedReader buffer;

URL url = new URL("http://www.google.com/search?hl=en&q=adwords&meta= ");

URLConnection myConn = (HttpURLConnection)url.openConnection();

myConn.setRequestProperty("User-agent","");

buffer = new BufferedReader(new InputStreamReader(myConn.getInputStream()));

while ((line = buffer.readLine()) != null) {

sb1.append(line);

}

System.out.println(sb1);

}

}

Please help me by suggesting the necessary changes that are needed to done in the coding to get my requirement.

I apologize for my poor English

Thanks in advance

Regards,

Bindu.

[1162 byte] By [himabindu136a] at [2007-11-27 4:46:19]
# 1
See reply #2 from this thread: http://forum.java.sun.com/thread.jspa?threadID=787097
prometheuzza at 2007-7-12 9:58:51 > top of Java-index,Java Essentials,Java Programming...