beating a dead horse: automated form submission
whit at shaftnet.org
Sun Jan 26 18:38:34 CET 2003
Peter Hansen <peter at engcorp.com> wrote in message
news:<3E32EFD8.D00D4656 at engcorp.com>...
> To help you further, I'd have to see what you've been trying. Can you
> not post a snippet or two of your code for us to review?
Well I'm tinkering with the snippet from the FAQ and trying it out on
www.musi-cal.com's little query page. Here's the code:
import httplib, sys, time
### build the query string
qs = "First=Josephine&MI=Q&Last=Public"
### connect and send the server a path
httpobj = httplib.HTTP('www.musi-cal.com', 80)
### now generate the rest of the HTTP headers...
httpobj.putheader('Content-length', '%d' % len(qs))
### find out what the server said in response...
reply, msg, hdrs = httpobj.getreply()
if reply != 200:
... When I tried this it crashed WinPython :)
Thanks for any help! -whit
More information about the Python-list