Metadata-Version: 2.1
Name: clean_links
Version: 0.1.2
Summary: Tools for cleaning up links
Home-page: https://github.com/stringertheory/clean-links
Author: Mike Stringer
Author-email: mike.stringer.internet@gmail.com
Requires-Python: >=3.8,<4.0
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Project-URL: Documentation, https://stringertheory.github.io/clean-links/
Project-URL: Repository, https://github.com/stringertheory/clean-links
Description-Content-Type: text/markdown

# clean-links

[![Release](https://img.shields.io/github/v/release/stringertheory/clean-links)](https://img.shields.io/github/v/release/stringertheory/clean-links)
[![Build status](https://img.shields.io/github/actions/workflow/status/stringertheory/clean-links/main.yml?branch=main)](https://github.com/stringertheory/clean-links/actions/workflows/main.yml?query=branch%3Amain)
[![codecov](https://codecov.io/gh/stringertheory/clean-links/branch/main/graph/badge.svg)](https://codecov.io/gh/stringertheory/clean-links)
[![Commit activity](https://img.shields.io/github/commit-activity/m/stringertheory/clean-links)](https://img.shields.io/github/commit-activity/m/stringertheory/clean-links)
[![License](https://img.shields.io/github/license/stringertheory/clean-links)](https://img.shields.io/github/license/stringertheory/clean-links)

Tools for cleaning up links.

Remove cruft from URLs using the rules from
https://github.com/ClearURLs/Rules

Unshorten URLs by making requests and following redirects.

Are these two links the same?

```python
link1 = "https://trib.al/5m7fAg3"
link2 = "https://bit.ly/dirtylank"

resolved1 = unshorten_url(link1).get("resolved")
cleaned1 = clear_url(resolved1)

resolved2 = unshorten_url(link2).get("resolved")
cleaned2 = clear_url(resolved2)

cleaned1 == cleaned2  # True!
```

