Skip to content

urlopen connection to you test HTTPS URL #26

@jaluecht

Description

@jaluecht

I am following you documentation to obtain the Aphrodite web page with the following code:

from urllib.request import urlopen

my_address = "https://realpython.com/practice/aphrodite.html"

html_page = urlopen(my_address)
html_text = html_page.read().decode('utf-8')

print(html_text)

I am getting SSL errors. When I add the cafile option, I get invalid certificate error. How can I makke this work?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions