[BangPypers] need help in trying to create a python web bot

Senthil Kumaran orsenthil at gmail.com
Wed Jan 14 07:29:14 CET 2009


> Anand Balachandran Pillai  wrote:
>> Hi,
>>
> Are you trying to call the search API ?  If so, the default urllib/urllib2
> actions won't help you, since all these result in GET requests.
> If you try to  use HTTP GET you will get "405 - Method not allowed".
>
> You need to POST to this API. It is not directly possible using urllib/urllib2.
> You can use httplib for this.
>
> Also take a look at this recipe
>
> http://code.activestate.com/recipes/146306/

That would be good if you are trying with just the search and learning things.

For serious purposes, I would suggest you to look at pygoogle.sf.net,
the python wrapper around google SOAP APIs. Google search, spelling
suggestions comes at the call of a method. Mark Pilgirms book "Dive
into Python" has a section on Web Services where he gives a bare bones
introduction.

-- 
Senthil


More information about the BangPypers mailing list