tagparser

Crates.iotagparser
lib.rstagparser
version0.2.0
sourcesrc
created_at2024-01-06 15:45:10.413778
updated_at2024-01-06 16:02:00.657465
descriptionExtract any tags from html page
homepage
repositoryhttps://github.com/tenqz/tagparser
max_upload_size
id1091005
size5,662
Oleg Patsay (tenqz)

documentation

https://docs.rs/tagparser

README

Tagparser

Extract any html tags from html page

Installation

You can install Ahref using cargo:

cargo add tagparser

Usage

Here's an example of how to use Tagparser lib:

use tagparser::Parser;

fn main() {
    let html = "<a href='https://github.com/tenqz'>Test link</a><p>test p tag</p>".to_string();
    let mut parser = Parser::new(html);
    println!("{:?}", parser.parse_tags("a".to_string()));
    println!("{:?}", parser.parse_tags("p".to_string()));
}

As a result, all "a" and "p" tags will be displayed.

["<a href='https://github.com/tenqz'>Test link</a>"]
["<p>test p tag</p>"]
Commit count: 0

cargo fmt