How to Retrieve Data from an HTTPS://URL

P

Peter Hansen

Harlin said:
I am trying to pull data from a web page at https://localhost/wps.
While this would work if the url was http://localhost/wps, it doesn't
work with 'https.'

I can do this:

import urllib
data = urllib.urlopen('http://localhost/wps').read()

But not with https. How can I pull data from a https url?

Does the site you are trying also require a password? Is it a public
site and if so what is it?

What platform are you using? What version of Python and OS?

Think also if you're missing other potentially critical details that
will help us out, and please fill them in.

-Peter
 
F

Fuzzyman

It certainly *should* work - have you tried with urllib2 ? I assume the
page works when fetched with a browser ?

You don't have any proxy settings do you (Python can pick up on these
automatically) ?

What error are you getting (or what value in data) ?

All the best,

Fuzzyman
http://www.voidspace.org.uk/python/index.shtml
 
L

LordLaraby

You might be using ActiveState python on Windows? If so, you most
likely do not have the SSL layer that's required to process HTTPS
protocol queries.
You should install 'standard' Python from python.org to get the SSL
handling functionality. I understand that ActiveState can not
distribute the SSL code, for national security reasons. :)

LL
 

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
473,774
Messages
2,569,599
Members
45,175
Latest member
Vinay Kumar_ Nevatia
Top