[BangPypers] need help in trying to create a python web bot
Anand Balachandran Pillai
abpillai at gmail.com
Wed Jan 14 07:21:11 CET 2009
On Wed, Jan 14, 2009 at 11:32 AM, Dhaval Lilani <dlilani at google.com> wrote:
> I am trying to create a webrobot in python that does the following.
> Send a post query to google.com and print the result.
> I have not had any luck with pydocs and online code examples.
> I keep on getting a 405 method not allowed.
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
> BangPypers mailing list
> BangPypers at python.org
More information about the BangPypers