Olá prezados, espero que todos estejam bem !
Durante a aula de requisições tive o retorno de um erro
requests.exceptions.SSLError: HTTPSConnectionPool(host='guilhermeonrails.github.io', port=443): Max retries exceeded with url: /api-restaurantes/restaurantes.json (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1077)')))
fiz algumas pesquisas sobre como contornar e a solução sugerida foi incluir o "Verify=False", ficando assim :
import requests
url = 'https://guilhermeonrails.github.io/api-restaurantes/restaurantes.json'
response = requests.get(url, verify=False)
print(response)
Até que retornar a response correta, mas com um alerta:
InsecureRequestWarning: Unverified HTTPS request is being made to host 'guilhermeonrails.github.io'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#tls-warnings
warnings.warn(
<Response [200]>
Haveria alguma forma para tratar esta situação sem gerar o alerta?
Pacotes instalados no venv:
certifi==2025.10.5
charset-normalizer==3.4.4
idna==3.11
requests==2.32.5
urllib3==2.5.0
Desde já agradeço a atenção!