Open x0day opened 3 years ago
This would be extremely helpful for managed environments where https connections to the outside may not be possible. A container could be built with a current copy, and being able to provide this at the command line would be extremely helpful.
I use Scrapy, which uses tldextract. I'd like to be able to set PUBLIC_SUFFIX_LIST_URLS, via an environment variable, to an empty array, so that it always either uses the cache or the snapshot. As of now, it seems to sometimes try to update the cache, and that request can fail.
Ok, I see, I'm into this! Maybe add a TLDEXTRACT_PUBLIC_SUFFIX_LIST_URLS
environment variable check here, similar to the TLDEXTRACT_CACHE_TIMEOUT
read above it. I'm thinking newline delimited URLs in that string. I agree the most common use will be to set the environment variable to the empty string.
Maybe add a
TLDEXTRACT_PUBLIC_SUFFIX_LIST_URLS
environment variable check here
For parity with the CLI, the parsed env var would specially handle local files. See these lines.
PUBLIC_SUFFIX_LIST_URLS
now can only define with the function arguments, can this define by environment?