DEV Community

KENNY
KENNY

Posted on

SkipLink: A Python Tool That Bypasses Ad-Driven URL Shorteners in One Click

SkipLink: Bypass ad-driven URL shorteners in one click

We've all been there: someone sends you adf.ly/xyz or earn4link.in/FLf1Y1,
and instead of a link you get a 5-second countdown, a popup asking you to
enable notifications, and a fake "Top 10 hospitals" article stuffed with ads —
before you reach the actual destination. That's the "shorten-and-earn"
business model: the person who made the link gets paid per click, and you
pay with your time.

SkipLink is a free, open-source tool that unwraps those links straight to
the real destination. No ads rendered, no timers, no fake pages.

What SkipLink does

  • Follows HTTP redirect chains and interstitial pages — a shortener pointing at another shortener keeps resolving.
  • Recognizes 1,537 shortener domains out of the box.
  • Decodes the usual tricks shortener pages use to hide the real link.
  • Detects the walls it can't climb — Google reCAPTCHA gates, safelink verification pages, and ad-farm "money pages" — and says so honestly, instead of guessing.
  • Ships as a one-click GUI, a CLI, and prebuilt executables for Windows + Linux.

How the engine works

The core is 100% Python standard library — zero dependencies.

1. Follow redirects manually

SkipLink sends one HTTP request with a real-browser User-Agent (cookies kept
across hops), but does not follow redirects automatically:

status, resp_headers, body = _fetch(opener, current, timeout, headers)
location = resp_headers.get("Location")
if status in {300, 301, 302, 303, 307, 308} and location:
    current = urljoin(current, _clean_url(location))
Enter fullscreen mode Exit fullscreen mode

2. Extract the destination from interstitial pages

If the response is an HTML/JSON page instead of a redirect, the engine scans it
for the embedded destination. It handles, among others:

  • <meta http-equiv="refresh">
  • location.href = "..." / window.open("...")
  • var link = "..." / var url = "..."
  • atob("...") (base64) and unescape("...")
  • Skip/continue button anchors, data-* attributes, iframes
  • JSON APIs ({"destination": "..."})
  • A bare URL in a plain-text response

Every extracted candidate is filtered against a blocklist of ad/tracker CDNs
(doubleclick, taboola, adsterra, ...) so ads are never followed.

3. Stop at the real destination — or report the wall

The resolver stops when a page has no further redirect and no embedded link.
Then it classifies what that page is:

  • Captcha gate — Google reCAPTCHA / "human verification" → can't be auto-bypassed; only a real human in a real browser gets the link.
  • Safelink gate — wp-safelink "click to continue" locks.
  • Money page — a big filler article whose only purpose is showing ads, with no real off-site content links.
result["protection"] = detect_protection(text, current)
result["note"] = protection_note(result["protection"])
Enter fullscreen mode Exit fullscreen mode

Optional: real-browser mode

Some hardened shorteners only reveal the destination when JavaScript runs.
SkipLink can drive a headless Chromium via Playwright, wait out countdowns,
and auto-click skip/continue/get-link buttons:

pip install -r requirements-browser.txt
playwright install chromium
skiplink -b "https://ouo.io/xyz"
Enter fullscreen mode Exit fullscreen mode

Using it

CLI

python main.py "https://adf.ly/AbCdEf"          # one link
python main.py -f links.txt                     # a file of links
python main.py -j url1 url2                     # JSON output for scripting
python main.py -b "https://ouo.io/xyz"          # browser mode
Enter fullscreen mode Exit fullscreen mode

As a library

from skiplink import resolve

result = resolve("https://adf.ly/AbCdEf")
print(result["final"])   # the destination URL
if result["note"]:
    print("NOTE:", result["note"])  # e.g. "Captcha-gated ..."
Enter fullscreen mode Exit fullscreen mode

GUI

python gui.py   # or double-click the prebuilt app
Enter fullscreen mode Exit fullscreen mode

Paste a link, press Enter, and the chain is resolved in seconds.

Try it

If it saves you time and ad-hassle, a star or a sponsor keeps the coffee
flowing: https://github.com/sponsors/akashmark8-cloud

MIT licensed, 20 unit tests, core runs with zero dependencies.

Top comments (0)