extd

Crates.ioextd
lib.rsextd
version0.1.4
sourcesrc
created_at2022-11-02 06:13:42.747179
updated_at2022-11-03 03:12:27.140484
descriptionFetch and extract HTML's title and description by given link.
homepage
repositoryhttps://github.com/alexzhang1030/extd/
max_upload_size
id703299
size3,736
Alex (alexzhang1030)

documentation

README

extd

Fetch and extract HTML's title and description by given link.

Usage

in Cargo.toml:

[dependencies]
extd = "0.1.2"

Example

use extd::extract_td;

fn main() {

    let res = extract_td("https://www.rustlang.org/");
    match res {
        Ok(res) => println!("{:?}", res),
        _ => println!("otherwise"),
    }
}

return value:

pub struct ExtractResult {
    // title
    pub title: String,
    // description
    pub desc: String,
}
Commit count: 9

cargo fmt