clearurl 0.5.1

A rust implementation for ClearURL
Documentation

clearurl

This is a Rust implementation of the ClearURL.

Usage

# Cargo.toml

clearurl = "0.5"
use clearurl::URLCleaner;

#[tokio::main]
async fn main() {
  let cleaner = URLCleaner::from_file("./rules.toml").unwrap();

  let url = "https://b23.tv/C0lw13z";
  cleaner.clear(url).await.unwrap();

  assert_eq!(
      url.as_str(),
      // normal queries will be kept
      "https://www.bilibili.com/video/BV1GJ411x7h7?p=1"
  );

  println!("Clean URL: {}", url);
}
wget https://raw.githubusercontent.com/Avimitin/clearurl/master/rules.toml

cargo run --release