Cookies

S

sydneyguru

Trying to write a python script that does the same thing my browser does
when posting a form.(cgi)

All works except for this. My browser has a cookie which it also sends, and
the server insists on getting.

So how can I replicate this under python? I've looked at cookie module but
can't see how to use it to achieve this. Please help.
 
M

Michael Geary

Trying to write a python script that does the same thing my browser
does when posting a form.(cgi)

All works except for this. My browser has a cookie which it also sends,
and the server insists on getting.

So how can I replicate this under python? I've looked at cookie
module but can't see how to use it to achieve this. Please help.

That's right, the cookie module is for use on a server, not a client.

Try the ClientCookie module:

http://wwwsearch.sourceforge.net/ClientCookie/

I've used this successfully to do client-side things such as logging into
Yahoo as a browser would.

-Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,181
Messages
2,570,970
Members
47,537
Latest member
BellCorone

Latest Threads

Top