diff options
author | Florian Bruhin <me@the-compiler.org> | 2021-03-15 11:09:32 +0100 |
---|---|---|
committer | Florian Bruhin <me@the-compiler.org> | 2021-03-15 11:09:32 +0100 |
commit | 9303e6a85489775f63b5d15b7bbd3173f74764d9 (patch) | |
tree | 006d2633c3db59abfcdeabc750720e910d649a8f /misc | |
parent | b11f0e0a6512676ecdcc32f20c0af14767e1ac1e (diff) | |
download | qutebrowser-9303e6a85489775f63b5d15b7bbd3173f74764d9.tar.gz qutebrowser-9303e6a85489775f63b5d15b7bbd3173f74764d9.zip |
tests: Don't download TLD list
Diffstat (limited to 'misc')
-rwxr-xr-x | misc/userscripts/qute-lastpass | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/misc/userscripts/qute-lastpass b/misc/userscripts/qute-lastpass index ac9783641..d2a72f077 100755 --- a/misc/userscripts/qute-lastpass +++ b/misc/userscripts/qute-lastpass @@ -60,6 +60,8 @@ argument_parser.add_argument('--io-encoding', '-i', default='UTF-8', help='Encoding used to communicate with subprocesses') argument_parser.add_argument('--merge-candidates', '-m', action='store_true', help='Merge pass candidates for fully-qualified and registered domain name') +argument_parser.add_argument('--no-tld-download', action='store_true', + help="Don't download TLD list") group = argument_parser.add_mutually_exclusive_group() group.add_argument('--username-only', '-e', action='store_true', help='Only insert username') @@ -117,7 +119,12 @@ def main(arguments): argument_parser.print_help() return ExitCodes.FAILURE - extract_result = tldextract.extract(arguments.url) + if arguments.no_tld_download: + extract = tldextract.TLDExtract(suffix_list_urls=None) + else: + extract = tldextract.extract + + extract_result = extract(arguments.url) # Try to find candidates using targets in the following order: fully-qualified domain name (includes subdomains), # the registered domain name and finally: the IPv4 address if that's what |