A simple module that removes tracking fields from URLs and unshort shortened URLs.
Project description
What it does?
In addition to removing tracking fields from URLs, Unalix also try to gets the direct link from shortened URLs.
Installation
pip3 install --upgrade 'unalix'
or
pip3 install --upgrade 'git+https://github.com/AmanoTeam/Unalix'
The git repository will always have the most recent changes, so it is recommended that you install/update the module through it.
Usage:
Let's see some examples:
On a Python3 console:
from unalix import clear_url, unshort_url
url = 'http://example.com/?utm_source=google'
result = clear_url(url)
print(result)
url = 'http://goo.gl/ko4LWp'
result = unshort_url(url)
print(result)
Output:
http://example.com/
https://forum.xda-developers.com/android/apps-games/app-youtube-vanced-edition-t3758757
Limitations
- Getting direct links from URL shorteners
- Unalix only follows the URLs/paths provided by the
Location
header (see RFC 7231, section 7.1.2: Location). It means that Unalix cannot obtain direct links from URL shorteners that require user interaction (e.g clicking a button or resolving CAPTCHA) to redirect or that uses JavaScript code to redirect.
- Unalix only follows the URLs/paths provided by the
Contact
Want to say something? Need some help? Open a issue or send a email.
License
Unalix in licensed under the GNU Lesser General Public License v3.0.
Third party software
Unalix includes some third party software. See them below:
-
ClearURLs
- Author: Kevin Röbert (KevinRoebert)
- Repository: KevinRoebert/ClearUrls
- License: GNU Lesser General Public License v3.0
-
python-requests
- Author: Kenneth Reitz
- Repository: psf/requests
- License: Apache v2.0
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Unalix-0.5.tar.gz
(6.9 kB
view hashes)
Built Distribution
Unalix-0.5-py3-none-any.whl
(19.1 kB
view hashes)