mirror of
https://github.com/Hopiu/lychee.git
synced 2026-04-17 11:50:59 +00:00
14 lines
363 B
Rust
14 lines
363 B
Rust
|
|
use lychee_lib::extract::Extractor;
|
||
|
|
use lychee_lib::Result;
|
||
|
|
use lychee_lib::{FileType, InputContent};
|
||
|
|
use std::fs;
|
||
|
|
|
||
|
|
#[tokio::main]
|
||
|
|
async fn main() -> Result<()> {
|
||
|
|
let input = fs::read_to_string("fixtures/elvis.html").unwrap();
|
||
|
|
let links = Extractor::extract(&InputContent::from_string(&input, FileType::Html));
|
||
|
|
println!("{:#?}", links);
|
||
|
|
|
||
|
|
Ok(())
|
||
|
|
}
|