0

I met SSL error when working with YouTube API v3

youtube = build(YOUTUBE_API_SERVICE_NAME, YOUTUBE_API_VERSION, developerKey=DEVELOPER_KEY)

I tried use below line but it did not help

ssl._create_default_https_context = ssl._create_unverified_context

My error:

/usr/lib/python3.5/ssl.py in do_handshake(self, block)
    986             if timeout == 0.0 and block:
    987                 self.settimeout(None)
--> 988             self._sslobj.do_handshake()
    989         finally:
    990             self.settimeout(timeout)

/usr/lib/python3.5/ssl.py in do_handshake(self)
    631     def do_handshake(self):
    632         """Start the SSL/TLS handshake."""
--> 633         self._sslobj.do_handshake()
    634         if self.context.check_hostname:
    635             if not self.server_hostname:

SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:645)

How do I set the SSL to some thing like: no-check-certificate for this YouTube v3 API?

Grokify
  • 15,092
  • 6
  • 60
  • 81
Anh Nguyen
  • 13
  • 3

0 Answers0