View Single Post
Old 06-12-2008, 03:29 AM   #6 (permalink)
Belisarius
Java fanboy
 
Belisarius's Avatar
 
Join Date: Aug 2003
Posts: 1,173
Belisarius is on a distinguished road
You need to be a little bit more precise - *are* you reading an HTTP response already, or do you *want* to read an HTTP response and need help figuring it out.

Assuming the former, for Google, you could simply put the whole response into a String, search for a table containing 'class="t bt"' - as that seems to hold the search results. The "total" is contained in the last <td> elements - I'd just parse it out. Every search engine will be different, and need a custom parseer. Then you could use JDBC to stick it into a database, or if you didn't want to mess around with that, just dump it into a flat file.
__________________
GitS
Belisarius is offline   Reply With Quote