The urlextract CLI provides several flags to filter, validate, and limit the URL extraction process:
Filtering and Uniqueness
-u, --unique: Only print unique URLs found in the file.-dl, --disable-localhost: Prevents the extraction of localhost as a URL.-i <ignore_file>, --ignore-file <ignore_file>: Provide a text file containing URLs to be excluded from the results.-p <permit_file>, --permit-file <permit_file>: Provide a text file containing only the URLs that are allowed to be processed.
Validation and Limits
-c, --check-dns: Only prints URLs that have existing domain names (performs DNS checks).-l LIMIT, --limit LIMIT: Sets a maximum count of URLs to process. Set to 0 to disable the limit. The default limit is 10000.
Metadata
-h, --help: Show help message.-v, --version: Show version number.
Usage: $ urlextract [-h] [-v] [-u] [-dl] [-c] [-i <ignore_file>] [-p <permit_file>] [-l LIMIT] [<input_file>]
optional arguments:
-h, --help show this help message and exit
-v, --version show program's version number and exit
-u, --unique print out only unique URLs found in file
-dl, --disable-localhost
disable extracting "localhost" as URL
-c, --check-dns print out only URLs for existing domain names
-i <ignore_file>, --ignore-file <ignore_file>
input text file with URLs to exclude from extraction
-p <permit_file>, --permit-file <permit_file>
input text file with URLs that can be processed
-l LIMIT, --limit LIMIT
Maximum count of URLs that can be processed. Set 0 to
disable the limit. Default: 10000