leoncvlt / raiplay-dl

⏬ Python downloader for the Italian streaming platform RaiPlay
8 stars 3 forks source link

Add certifi #12

Closed drego85 closed 2 years ago

drego85 commented 2 years ago

This requirement is useful in avoiding this error:

Traceback (most recent call last):
  File "/Users/Git/raiplay-dl/raiplay-dl.py", line 83, in <module>
    download(args.url, args.download_directory)
  File "/Users/Git/raiplay-dl/raiplay-dl.py", line 26, in download
    content_url = urllib.request.urlopen(convert_url_to_json(url))
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/request.py", line 216, in urlopen
    return opener.open(url, data, timeout)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/request.py", line 519, in open
    response = self._open(req, data)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/request.py", line 536, in _open
    result = self._call_chain(self.handle_open, protocol, protocol +
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/request.py", line 496, in _call_chain
    result = func(*args)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/request.py", line 1391, in https_open
    return self.do_open(http.client.HTTPSConnection, req,
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/request.py", line 1351, in do_open
    raise URLError(err)
urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:997)>