Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #50805
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!usenet.stanford.edu!panix!gordon |
|---|---|
| From | John Gordon <gordon@panix.com> |
| Newsgroups | comp.lang.python |
| Subject | Re: Python HTTP POST |
| Date | Wed, 17 Jul 2013 20:15:29 +0000 (UTC) |
| Organization | PANIX Public Access Internet and UNIX, NYC |
| Lines | 21 |
| Message-ID | <ks6u11$gk4$1@reader2.panix.com> (permalink) |
| References | <00ec2f9b-fcae-428c-8932-163e653dd71b@googlegroups.com> |
| NNTP-Posting-Host | panix3.panix.com |
| X-Trace | reader2.panix.com 1374092129 17028 166.84.1.3 (17 Jul 2013 20:15:29 GMT) |
| X-Complaints-To | abuse@panix.com |
| NNTP-Posting-Date | Wed, 17 Jul 2013 20:15:29 +0000 (UTC) |
| User-Agent | nn/6.7.3 |
| Xref | csiph.com comp.lang.python:50805 |
Show key headers only | View raw
In <00ec2f9b-fcae-428c-8932-163e653dd71b@googlegroups.com> Matt Graves <tunacubes@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
# the google form search input box is named 'q'
data = { 'q': 'Pie' }
response = urllib2.urlopen('http://google.com', urllib.urlencode(data))
print response.read()
--
John Gordon A is for Amy, who fell down the stairs
gordon@panix.com B is for Basil, assaulted by bears
-- Edward Gorey, "The Gashlycrumb Tinies"
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Python HTTP POST Matt Graves <tunacubes@gmail.com> - 2013-07-17 11:49 -0700
Re: Python HTTP POST John Gordon <gordon@panix.com> - 2013-07-17 20:15 +0000
Re: Python HTTP POST Joel Goldstick <joel.goldstick@gmail.com> - 2013-07-17 16:26 -0400
Re: Python HTTP POST Sivaram Neelakantan <nsivaram.net@gmail.com> - 2013-07-18 23:37 +0530
Re: Python HTTP POST alex23 <wuwei23@gmail.com> - 2013-07-18 12:04 +1000
csiph-web