0

I got a simple Python script that reads a playlist from google music using the YTMusic package/library:

from ytmusicapi import YTMusic
ytmusic = YTMusic('headers_auth.json')
blah = ytmusic.get_playlist('blah')

It works fine but when I use Fiddler Classic on my Win 10 machine & I decrypt SSL traffic I get:

Exception has occurred: SSLError HTTPSConnectionPool(host='music.youtube.com', port=443): Max retries exceeded with url: /youtubei/v1/browse?alt=json&key=blah (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:997)')))

Maybe I can tell Python to ignore SSL errors at the global level (as I don't control the http requests in the library)? I see there's a verify parameter one can pass as false but I don't control that code, the library does.

What else can I do?

(I'm able to use chrome & Fiddler classic is able to intercept that traffic)

spottedmahn
  • 14,823
  • 13
  • 108
  • 178
  • 1
    Check the dependencies of the python packe `YTMusic` belongs to. If you know the used http client used you can check how to add Fiddler certificate or disable TLS certificate checking. – Robert Sep 12 '22 at 11:16
  • [it appears](https://github.com/sigma67/ytmusicapi/blob/20b4631c31b65d5d40caf89b5db5fd661e82a979/ytmusicapi/ytmusic.py#L1) to be using [requests](https://pypi.org/project/requests/) @Robert – spottedmahn Sep 12 '22 at 18:30

0 Answers0