Python HTTP POST

alex23 wuwei23 at gmail.com
Wed Jul 17 22:04:17 EDT 2013


On 18/07/2013 4:49 AM, Matt Graves wrote:
> How would I submit a python HTTP POST request to... for example, go to google.com, enter "Pie" into the search box and submit (Search)

Other replies have suggested how you could do it by building the request 
yourself. Another approach is to interact directly with the form using 
mechanize:

http://wwwsearch.sourceforge.net/mechanize/

Unfortunately this doesn't appear to actually work with Google, as its 
robots.txt won't allow it. But if you're dealing with an intranet-based 
form in your organisation you should be fine.




More information about the Python-list mailing list