john-kurkowski/tldextract

requests.Session pass-in (for customizing things to do with the PSL fetch)

Closed this issue · 1 comments

in tldextract/remote.py it should allow passing in a custom instance of Session from requests. need that change and then changes up the call-stack so that this custom session can be passed in, from the various usages.

It solves two open issues -- and more -- cleanly

SSL Certificate Check: Self-signed certificates still cause a problem.

requests.exceptions.SSLError: HTTPSConnectionPool(host='raw.githubusercontent.com', port=443): Max retries exceeded
with url: /publicsuffix/list/master/public_suffix_list.dat (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1129)')))

code inspection seems to indicate no way to actually pass in a custom session, in which one could set Session.verify = False
although default Session behavior seems to pick up some proxy setting info from the environment.