import requests
import time
response = requests.get('https://aviastacjapaliw.pl/stacje/avia-protasy/', verify=False)
print(response)
print(response.text)
time.sleep(1)
response = requests.get('https://aviastacjapaliw.pl/stacje/avia-protasy/')
second query fails with requests.exceptions.SSLError: HTTPSConnectionPool(host='aviastacjapaliw.pl', port=443): Max retries exceeded with url: /stacje/avia-protasy/ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1007)')))
openssl s_client -connect aviastacjapaliw.pl:443 -showcerts
lists
depth=0 CN = aviapolska.pl
verify error:num=20:unable to get local issuer certificate
verify return:1
depth=0 CN = aviapolska.pl
verify error:num=21:unable to verify the first certificate
verify return:1
at the same time Firefox happily opens https://aviastacjapaliw.pl/stacje/avia-protasy/ and shows Starfield CA as root.
Where is the problem? Is it requests package bug to not recognise this CA?