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, easier

Python HTTP POST

2013-07-17 Thread Matt Graves
I am going to be creating a python script that will make filling in information at my job easier. I have all of the information I need... I guess I just need to see it in practice to fully grasp it. How would I submit a python HTTP POST request to... for example, go to google.com, enter Pie

Re: Python HTTP POST

2013-07-17 Thread John Gordon
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 (Search) Something like this: import urllib import urllib2

Re: Python HTTP POST

2013-07-17 Thread Joel Goldstick
On Wed, Jul 17, 2013 at 4:15 PM, John Gordon gor...@panix.com 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

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

Re: PYTHON HTTP POST WORKING EXAMPLE NEEDED

2009-01-23 Thread Benjamin Kaplan
On Fri, Jan 23, 2009 at 8:02 PM, r rt8...@gmail.com 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

RE: PYTHON HTTP POST WORKING EXAMPLE NEEDED

2009-01-23 Thread bruce
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 the few bullies

PYTHON HTTP POST

2009-01-14 Thread lilanidhaval
Hi, I need one complete example of how to do a http post to any site. I have tried making a POST to google but all I am returned with is a 405 error. I don't want to use Pygoogle as I want to try and do this with other sites. I am also having problems inputing with the param I have tried

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(fields)) content_type = application/x-www-form-urlencoded return content_type, body If you need to post files too,

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(fields))         content_type = application/x-www-form-urlencoded         return

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):

PYTHON HTTP POST WORKING EXAMPLE NEEDED

2009-01-14 Thread dhaval
Hi, Can someone please give me an example of a working python post? for example using the site http://www.cookiemag.com/ Thanks in advance, Dhaval -- http://mail.python.org/mailman/listinfo/python-list

Re: PYTHON HTTP POST WORKING EXAMPLE NEEDED

2009-01-14 Thread dhaval
On Jan 14, 4:11 pm, dhaval lilanidha...@gmail.com 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

Re: PYTHON HTTP POST WORKING EXAMPLE NEEDED

2009-01-14 Thread Diez B. Roggisch
dhaval wrote: On Jan 14, 4:11 pm, dhaval lilanidha...@gmail.com 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