On Wed, Jan 14, 2009 at 11:32 AM, Dhaval Lilani <[email protected]> wrote: > Hi, > > 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 http://code.activestate.com/recipes/146306/ > > Regards, > Dhaval > > _______________________________________________ > BangPypers mailing list > [email protected] > http://mail.python.org/mailman/listinfo/bangpypers > > -- -Anand _______________________________________________ BangPypers mailing list [email protected] http://mail.python.org/mailman/listinfo/bangpypers
