Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setting PUBLIC_SUFFIX_LIST_URLS with environment variable #233

Open
x0day opened this issue Sep 26, 2021 · 5 comments
Open

setting PUBLIC_SUFFIX_LIST_URLS with environment variable #233

x0day opened this issue Sep 26, 2021 · 5 comments

Comments

@x0day
Copy link

x0day commented Sep 26, 2021

PUBLIC_SUFFIX_LIST_URLS now can only define with the function arguments, can this define by environment?

@JohnOmernik
Copy link

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.

@john-kurkowski
Copy link
Owner

#197 may be helpful in the meantime. Although it's CLI args, not an environment variable.

@jpmckinney
Copy link

jpmckinney commented Nov 1, 2024

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.

@john-kurkowski
Copy link
Owner

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.

@john-kurkowski
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants