Irv Kalb <i...@furrypants.com> writes:

Lots of detail snipped.  I hope it won't matter...

> <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed 
> (_ssl.c:749)>
>
> Huh???
>
> I've read a bunch of documentation, and it looks like I'm doing
> everything right, but I cannot get this to work.  Any other
> suggestions to get this 3 line program to work correctly?

Just a data point...  It works here:

$ python3 t.py
Response is:  b'156.99\n'
$ cat t.py
import urllib.request
fullURLWithParameters = 'http://finance.yahoo.com/d/quotes.csv?s=aapl&f=l1'
# read all the data
response = urllib.request.urlopen(fullURLWithParameters).read()

print('Response is: ', response)
$ python3 --version
Python 3.5.2

Maybe you are missing some crucial certificates?  Presumably Python
finds them is standard paces, so it would be worth trying other accesses
of the URL.  For example, here:

$ wget -q -O - 'http://finance.yahoo.com/d/quotes.csv?s=aapl&f=l1' 
156.99

Finally, wget -S shows that the resource has moved.  It is now at

  Location: http://download.finance.yahoo.com/d/quotes.csv?s=aapl&f=l1

I don't think this has anything to do with your problem, but it's worth
noting.

-- 
Ben.
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to