mirror of
https://github.com/Hopiu/lychee.git
synced 2026-03-17 05:00:26 +00:00
* Upgrade to 2024 edition * Revert expr_2021 -> expr * resolve merge conflicts * make lint happy
14 lines
402 B
Rust
14 lines
402 B
Rust
use lychee_lib::Result;
|
|
use lychee_lib::extract::Extractor;
|
|
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 extractor = Extractor::default();
|
|
let links = extractor.extract(&InputContent::from_string(&input, FileType::Html));
|
|
println!("{links:#?}");
|
|
|
|
Ok(())
|
|
}
|