Un-Shorten your urls.

You might have come across various URL Shortening service providers, and it can be a problem going around and automating the entire url expanding task in your data.

Well, I found just the right library to do that.

URLEXPAND

This is a very well written and only available open source rust crate, which you can use to expand those silly short urls.

Example Usage:

use std::time::Duration;
use urlexpand::unshorten;

fn main() {
let url = "https://bit.ly/3alqLKi";
assert!(unshorten(url, Some(Duration::from_secs(10))).is_some()); // with timeout
assert!(unshorten(url, None).is_some()); // without timeout
}

Running your program:

cargo run --example unshorten

Current list of URL Shortening services supported:

  • bit.ly — Bitly Url Shortner
  • bit.do
  • buff.ly — Buffer URL Shortner
  • b.link — BLINK
  • chollo.to
  • cutt.ly
  • fa.by — part of rebrand.ly
  • goo.gl — Google Service has now stopped their url shortening service
  • gns.io — part of trim (tr.im)
  • is.gd
  • iz4.short.gy — short.io Service
  • ldn.im — part of trim (tr.im)
  • ow.ly — part of Hootsuite
  • rebrand.ly
  • rotf.lol — part of tinyurl.com
  • sh.st — shorte.st
  • snipr.com
  • snipurl.com
  • snurl.com
  • split.to — Linksplit
  • t.co — Twitter
  • tiny.cc
  • tinyurl.com — TinyURL
  • tiny.one — part of tinyurl.com
  • tny.sh — Linksplit
  • tr.im — trim (tr.im)