advurl_shortner - Advanced URL Shortener for Python
Easy-to-use, powerful python library to help you to shorten urls with advanced options. Supports multiple domains, URL TTL, split tests, visit statistics etc.
An extended native Python wrapper for AdvUrlShortner API with minimal requirements. Supports all methods and types of responses.
Features
- Easy to use
- Multiple domains
- URL TTL (Time-To-Live) in seconds. Auto expiry URL after some time.
- Redirect to second URL after primary URL expires (TTL)
- Randomized and weighted randomnized redirect to different URLs (split tests etc.)
- Password-protected statistics of visits to a shortened URL
- Password protected shortened URL parameters (TTL, second URL, etc.)
Installation
In order install this package, simply run:
pip install advurl_shortner
Usage
To use shorten_url, you first need to import the package:
import advurl_shortner
Shorten URL:
advurl_shortner.short("https://google.com/")
advurl_shortner.short("https://google.com/", description="Google search engine", password="1234x")
advurl_shortner.short("https://google.com/", ttl=86400)
advurl_shortner.short("https://google.com/", ttl=86400, second_url="https://bing.com/")
advurl_shortner.short("https://google.com/",second_url="https://bing.com/")
advurl_shortner.short("https://google.com/",second_url="https://bing.com/", weights=[0.3, 0.7])
Getting short URL parameters and visit statistics:
advurl_shortner.stat("https://illi.cfd/H","aaa")
TODO:
- More than 2 URLs
- Advanced visit statistics