#download #suffix #tld #gtld #private #public #cc-tld

tld_download

Download public & private gTLD & ccTLD

6 releases

0.1.3 May 16, 2024
0.1.2 Mar 23, 2022
0.1.1 Jan 28, 2022
0.0.2 Jan 27, 2022

#4 in #suffix


Used in ioc_extract

Custom license

93KB
95 lines

TLD Download

Linux Arm7 Linux x86_64 macOS

Downloads tld suffixes to a file

Requirements

  • Rust 1.75+

Usage

You can include this in your Cargo.toml file:

[dependencies]
tld_download = "0.1.3"

If you want to use it with the inbuilt public suffix db; then:

[dependencies]
tld_download = { version = "0.1.3", features = ["with-db"] }

and then

use tld_download::from_db;

fn main () {
    let db = from_db();
    assert!(!db.is_empty());
}

License: MIT


lib.rs:

Gets the public tld suffixes list from the Locally stored DB list cache This DB list does not include the private domains list & might get updated irregularly

Example Usage

use tld_download::from_db;

let suffixes = tld_download::from_db();
assert!(!suffixes.is_empty())

Downloads the public tld suffixes list from the internet websites publicsuffix.org & github.com/publicsuffix list

Example Usage

use tld_download::from_publicsuffix;

let suffixes = tld_download::from_publicsuffix(false);
assert!(suffixes.is_ok())

Dependencies

~7–22MB
~371K SLoC