Crates.io | extd |
lib.rs | extd |
version | 0.1.4 |
source | src |
created_at | 2022-11-02 06:13:42.747179 |
updated_at | 2022-11-03 03:12:27.140484 |
description | Fetch and extract HTML's title and description by given link. |
homepage | |
repository | https://github.com/alexzhang1030/extd/ |
max_upload_size | |
id | 703299 |
size | 3,736 |
Fetch and extract HTML's title and description by given link.
in Cargo.toml
:
[dependencies]
extd = "0.1.2"
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,
}