Re: Python HTTP POST

2013-07-18 Thread Sivaram Neelakantan
On Thu, Jul 18 2013,Joel Goldstick wrote: [snipped 28 lines] > > Many people find urllib and urllib2 to be confusing. There is a module > called requests which makes this stuff a lot easier. ymmv > > http://docs.python-requests.org/en/latest/ Yes, please use this instead of the url* ones, eas

Re: Python HTTP POST

2013-07-17 Thread alex23
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 d

Re: Python HTTP POST

2013-07-17 Thread Joel Goldstick
On Wed, Jul 17, 2013 at 4:15 PM, John Gordon wrote: > In <00ec2f9b-fcae-428c-8932-163e653dd...@googlegroups.com> Matt Graves < > tunacu...@gmail.com> writes: > > > How would I submit a python HTTP POST request to... for example, go to > > google.com, enter "Pie" into the search box and submit (Se

Re: Python HTTP POST

2013-07-17 Thread John Gordon
In <00ec2f9b-fcae-428c-8932-163e653dd...@googlegroups.com> Matt Graves writes: > 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) Something like this: import urllib import urllib2 # the google form search

RE: PYTHON HTTP POST WORKING EXAMPLE NEEDED

2009-01-23 Thread bruce
PM To: python-list@python.org Subject: Re: PYTHON HTTP POST WORKING EXAMPLE NEEDED Whatever scumbag would rate a new python's users with one start for asking us for help is a complete low-life. Keep acting like that and Python will fade away into the darkness forever. dhaval, Don't let

Re: PYTHON HTTP POST WORKING EXAMPLE NEEDED

2009-01-23 Thread Benjamin Kaplan
On Fri, Jan 23, 2009 at 8:02 PM, r wrote: > Whatever scumbag would rate a new python's users with one start for > asking us for help is a complete low-life. Keep acting like that and > Python will fade away into the darkness forever. Could you please explain where these stars you keep talking

Re: PYTHON HTTP POST WORKING EXAMPLE NEEDED

2009-01-14 Thread Diez B. Roggisch
dhaval wrote: > On Jan 14, 4:11 pm, dhaval wrote: >> Hi, >> >> Can someone please give me an example of a working python post? >> for example using the sitehttp://www.cookiemag.com/ >> >> Thanks in advance, >> Dhaval > > I have tried to look at the code at > http://code.activestate.com/recipes/1

Re: PYTHON HTTP POST WORKING EXAMPLE NEEDED

2009-01-14 Thread dhaval
On Jan 14, 4:11 pm, dhaval wrote: > Hi, > > Can someone please give me an example of a working python post? > for example using the sitehttp://www.cookiemag.com/ > > Thanks in advance, > Dhaval I have tried to look at the code at http://code.activestate.com/recipes/146306/ I can't make any sense

Re: PYTHON HTTP POST

2009-01-14 Thread dhaval
The action part of the field is not set to anything. I need any site with working example that accepts POST. On Jan 14, 2:21 pm, koranth...@gmail.com wrote: > Does google accept POST? > > Anyways, if you dont need to post files, you can use urlencode itself. > def encode_formdata(fields): >

Re: PYTHON HTTP POST

2009-01-14 Thread koranthala
On Jan 14, 2:21 pm, koranth...@gmail.com wrote: > Does google accept POST? > > Anyways, if you dont need to post files, you can use urlencode itself. > def encode_formdata(fields): >         body = urllib.urlencode(dict()) >         content_type = "application/x-www-form-urlencoded" >         retur

Re: PYTHON HTTP POST

2009-01-14 Thread koranthala
Does google accept POST? Anyways, if you dont need to post files, you can use urlencode itself. def encode_formdata(fields): body = urllib.urlencode(dict()) content_type = "application/x-www-form-urlencoded" return content_type, body If you need to post files too, then you