Crate clearurls

Source
Expand description

This crate provides a solution to remove tracking parameters and other nuisance from URLs.

In order to detect such parameters, this crates uses crowdsourced Rules from the ClearURLs browser extension.

A set of rules is included in this library, but you can supply your own. Refer to the ClearURLs documentation for specific syntax and semantics.

§Example

let cleaner = UrlCleaner::from_embedded_rules()?;
let res = cleaner.clear_single_url_str("https://example.com/test?utm_source=abc")?;
assert_eq!(res, "https://example.com/test");

Structs§

UrlCleaner
A UrlCleaner can remove tracking parameters from URLs.

Enums§

Error
Various errors that can happen while cleaning a URL