Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/alexzhang1030/extd

Fetch and extract HTML's title and description by given link.
https://github.com/alexzhang1030/extd

Last synced: 7 days ago
JSON representation

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

Awesome Lists containing this project

README

        

# extd

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

## Usage

in `Cargo.toml`:

```toml
[dependencies]
extd = "0.1.4"
```

### Example

```rust
use extd::extract_td;

fn main() {

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

return value:

```rust
pub struct ExtractResult {
// title
pub title: String,
// description
pub desc: String,
}
```