john-kurkowski/tldextract

control fallback_to_snapshot behavior from cli

Closed this issue · 2 comments

there is no command line option to toggle the fallback_to_snapshot behavior (True|False) of TLDExtract. At least from a testing perspective, to force URL fetch(es), it should be there.

I'm not sure about maintaining every possible Python API in the CLI. The CLI is just for quick, one-off queries. CLI users can do the following to set fallback_to_snapshot, yeah? Not too verbose.

$ python -c 'import tldextract; print(" ".join(tldextract.TLDExtract(fallback_to_snapshot=False)("forums.bbc.co.uk")))'
forums bbc co.uk

Fixed in #259/#260. I'm coming around on expanding the CLI. 😄