/var/spool/weblog
   


Prof Avery's weblog
dirt clods in your fuel rods

<spool@kenytt.net>

CSU Fullerton Perl Powered Python vi Hacker

Geek News

del.icio.us bookmarks

RSS


       
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 #


       

 

December 2018
Sun Mon Tue Wed Thu Fri Sat
           
         

RSS

Topics


Archives