bug on # Code: http://www.py4e.com/code3/urlregex.py
mice73jp opened this issue · 2 comments
Hi, I am MinSeok who is a newbie of Python..
I found one bug on code3/urlregex.py, so I am reporting below.
There were making ctx object but it would never use it later.
So this source code won't work because of error on urlopen() function to try to cconnect https without ctx of ssl.
So, Code will have to modify like below to work well.
-- Before
html = urllib.request.urlopen(url).read()
-- After
html = urllib.request.urlopen(url, context=ctx).read()
I am sorry for paying your attention of this issue, If someone already reported it.
I hope it will help you make your nice Python textbook and videos.
Sincerely,
MinSeok.
Hi Mice,
Please also note that newer versions of Python doesn't support SSL (Or for any reason I couldn't continue). I am not able to do the exercises with the SSL module, so in the context that you describe, you are reffering to a variable called ctx.
In the PY4E page, all the examples have the SSL part, but in Github they don't have, and I succesfully could complete the assigments.
Regards
JAB
This modification has been done. Thanks.