john-kurkowski / tldextract

Accurately separates a URL’s subdomain, domain, and public suffix, using the Public Suffix List (PSL).
BSD 3-Clause "New" or "Revised" License
1.84k stars 210 forks source link

resurrect need to pass custom requests session (old #158, etc) #250

Closed mcooperman closed 2 years ago

mcooperman commented 2 years ago

As best i can tell, this is not implemented. Sorry if i missed something, just squash it then... needed to go through a proxy. my thoughts are

mcooperman commented 2 years ago

it looks like default session behavior may pickup some environment settings, assuming one likes the default behavior. However, verify/don't verify SSL Certificates doesn't seem to be covered - and is an issue in some environments (proxies). this can be set at the session level. also, control of the trust_env setting on the session affects what environment variables are incorporated, and this can be set at the session level.

john-kurkowski commented 2 years ago

allow a custom session to be passed by code

I lean toward this option. It leverages Requests' existing interface. I lean away from additional, idiosyncratic globals, because globals. I lean away from more CLI, because it's a niche use case and this project isn't primarily a CLI.

The custom session option is roughly described in #158. Can we close this as duplicate, and concentrate further discussion there?

mcooperman commented 2 years ago

surely. i'll go along. reading up on contributions, etc. i think i have something working. trying to make sure tested thoroughly.

john-kurkowski commented 2 years ago

Cool. Closing as dupe. Tracked in #158.