I'm trying to open an https file using python on windows:

https://www3.eub.gov.ab.ca/eub/dds/iar_query/ApplicationAttachments.aspx?AppNumber=1438224

My current attempt was this:

import urllib
import urllib2
the_url = 'https://www3.eub.gov.ab.ca/eub/dds/iar_query/ApplicationAttachments.aspx'
values = {'AppNumber':'1438224'}
data = urllib.urlencode(values)
req = urllib2.Request(the_url, data)
handle = urllib2.urlopen(req)

At this point i get an error:

urlopen error unknown url type: https

How can I open this file with python and create a list of links on the page?

Recommended Answers

All 3 Replies

This is a secure website you are trying to get to, that could be a problem!

This is a secure website you are trying to get to, that could be a problem!

I was afraid of that ...

Maybe this will help?

http://www.noah.org/python/https/

Looks to be a Python module that will help you download from HTTPS sites. I assume regular HTTP GET commands, etc, won't work through an encrypted connection.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.