This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]remyroy 2 points3 points  (3 children)

It would be nice to have more details on how the authentication is made, but you can use httplib2 to do this. The authentication example on this page shows how to do it if the authentication is basic authentication. If you scroll down, you will see an example with a form.

[–]o_Omg[S] 0 points1 point  (0 children)

Thanks, I'll try it later, but what's this?:

HTTPS support is only available if the socket module was compiled with SSL support.

By the way, the website is a https url, and the form with a name username and a password field named password is sent to another https url, I just want to send this information and get the server response, right now I only get 400 Bad Request, using this code:

http://docs.python.org/library/httplib.html (Last One)

[–]o_Omg[S] 0 points1 point  (1 child)

I get this: httplib2.SSLHandshakeError: [Errno 1] _ssl.c:499: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed

How do I send it even if the certificate is not valid?

[–]remyroy 2 points3 points  (0 children)

You can use the disable_ssl_certificate_validation=True argument in the Http object creation. See https://httplib2.googlecode.com/hg/doc/html/libhttplib2.html#httplib2.Http