https://github.com/AmanoTeam/Unalix
Small, dependency-free, fast Python package for removing tracking fields from URLs.
https://github.com/AmanoTeam/Unalix
internet python python3 security
Last synced: 3 months ago
JSON representation
Small, dependency-free, fast Python package for removing tracking fields from URLs.
- Host: GitHub
- URL: https://github.com/AmanoTeam/Unalix
- Owner: AmanoTeam
- License: lgpl-3.0
- Archived: true
- Created: 2020-04-19T20:49:15.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-09-13T12:57:48.000Z (about 3 years ago)
- Last Synced: 2025-07-08T23:42:27.315Z (4 months ago)
- Topics: internet, python, python3, security
- Language: Python
- Homepage: https://pypi.org/project/unalix
- Size: 359 KB
- Stars: 38
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Unalix
Unalix is a library written in Python, it implements the specification used by the [ClearURLs](https://github.com/ClearURLs/Addon) addon for removing tracking fields from URLs.
## Installation
Install using `pip`:
```bash
python3 -m pip install --force-reinstall \
--disable-pip-version-check \
--upgrade \
'unalix'
```
The version from git might be broken sometimes, but you can also install from it:
```bash
python3 -m pip install --force-reinstall \
--disable-pip-version-check \
--upgrade \
'https://codeload.github.com/AmanoTeam/Unalix/tar.gz/refs/heads/master'
```
_**Note**: Unalix requires Python 3.6 or higher._
## Usage:
Removing tracking fields:
```python
import unalix
url: str = "https://deezer.com/track/891177062?utm_source=deezer"
result: str = unalix.clear_url(url=url)
assert result == "https://deezer.com/track/891177062"
```
Resolving shortened URL:
```python
import unalix
url: str = "https://bitly.is/Pricing-Pop-Up"
result: str = unalix.unshort_url(url=url)
assert result == "https://bitly.com/pages/pricing"
```
_**Tip**: The `unshort_url()` method will strip tracking fields from any URL before following a redirect, so you don't need to manually call `clear_url()` for it's return value._
## Contributing
If you have discovered a bug in this library and know how to fix it, fork this repository and open a Pull Request.
## Third party software
Unalix includes some third party software in its codebase. See them below:
- **ClearURLs**
- Author: Kevin Röbert
- Repository: [ClearURLs/Rules](https://github.com/ClearURLs/Rules)
- License: [GNU Lesser General Public License v3.0](https://gitlab.com/ClearURLs/Rules/blob/master/LICENSE)
- **Requests**
- Author: Kenneth Reitz
- Repository: [psf/requests](https://github.com/psf/requests)
- License: [Apache v2.0](https://github.com/psf/requests/blob/master/LICENSE)
- **Pyrogram**
- Author: Dan
- Repository: [pyrogram/pyrogram](https://github.com/pyrogram/pyrogram)
- License: [LGPL-3.0](https://github.com/pyrogram/pyrogram/blob/master/COPYING)