quran-api icon indicating copy to clipboard operation
quran-api copied to clipboard

SSLCertVerificationError

Open fayzull0h opened this issue 2 years ago • 2 comments

Hello, when I make a GET Request to your API though urllib.request.urlopen() in python, I get the following error: ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1122)

Do I need some sort of special certification in order to access your API?

fayzull0h avatar Jan 06 '23 20:01 fayzull0h

You can try updating your SSL certificates. pip install certifi

The API doesn't have any SSL related issue, the below code is working fine in my computer:

from urllib.request import urlopen

with urlopen("https://cdn.jsdelivr.net/gh/fawazahmed0/quran-api@1/editions.json") as response:
    print(response.status)

fawazahmed0 avatar Jan 06 '23 21:01 fawazahmed0

I got it working now thank you so much brother. Jazakallah khair

fayzull0h avatar Jan 07 '23 15:01 fayzull0h