Prof Avery's weblog
shimmering summit of the so-so


CSU Fullerton Perl Powered Python vi Hacker

Geek News

del.icio.us bookmarks


Fri, Apr 12, 2002

A tip for Google API experimenters
Check out Jython and use the Java API docs. Not only is Python a nicer language, but you can leave out the "get" and "set". Place googleapi.jar in your jre/lib/ext directory and try the following:

import com.google

engine = com.google.soap.search.GoogleSearch()
engine.key = '00000000000000000000000'
engine.queryString = 'google api'

answer = engine.doSearch()
for result in answer.resultElements:
    print result.URL
(Replace 000... with your key)

Much nicer.

/var/spool/last #



March 2018
Sun Mon Tue Wed Thu Fri Sat