Skip to main content

extract_direct_url_from_uddg

Function extract_direct_url_from_uddg 

Source
pub fn extract_direct_url_from_uddg(url: &str) -> Option<String>
Expand description

DuckDuckGo のトラッキングリダイレクト URL (uddg=) から正規の目的地 URL を抽出

例:

  • //duckduckgo.com/l/?uddg=https%3A%2F%2Fwww.rust-lang.org%2F&rut=... -> Some("https://www.rust-lang.org/")
  • /l/?uddg=https%3A%2F%2Fgithub.com%2F -> Some("https://github.com/")