URL Cleaner
Introduction
A package for removing tracing parameters from URLs. This package supports:
- Automatically updating filtering rules from Adguard.
- Custom filtering rules.
- Host pathname specific filtering.
- Hundreds of filtering rules for using!
Inspired by ClearUrl and URL Bot, thanks for their efforts!
Rules from:
Examples
原始: https://baijiahao.baidu.com/s?id=1748839822649920321&wfr=spider&for=pc
清除后: https://baijiahao.baidu.com/s?id=1748839822649920321
原始: https://mp.weixin.qq.com/s?__biz=MjM5OTExMjYwMA==&mid=2670081058&idx=6&sn=1ad7112020c2a4104d67ca542ab14444&chksm=bc12eed58b6567c30c78123a9e8901241512642305dabae4fa1f52357f5ce0ac7a85554#rd
清除后: https://mp.weixin.qq.com/s?__biz=MjM5OTExMjYwMA%3D%3D&mid=2670081058&idx=6&sn=1ad7112020c2a4104d67ca542ab14444#rd
原始: https://www.bilibili.com/video/BV158411b7ki/?spm_id_from=333234107.tianma.1-2-2.click
清除后: https://www.bilibili.com/video/BV158411b7ki/
Usage
Install
pip install url-cleaner
Clean URLs
from url_cleaner import UrlCleaner
c = UrlCleaner()
url = "https://baijiahao.baidu.com/s?id=1748839822649920321&wfr=spider&for=pc"
cleaned = c.clean(url)
print(cleaned)
https://baijiahao.baidu.com/s?id=1748839822649920321
Update rules
from url_cleaner import UrlCleaner
c = UrlCleaner()
c.ruler.update_rules()
Metadata
Release files for url-cleaner 0.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| url_cleaner-0.1.5.tar.gz | 22.2 kB | Without provenance | Details for url_cleaner-0.1.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| url_cleaner-0.1.5-py3-none-any.whl | Python 3 | none | any | Details for url_cleaner-0.1.5-py3-none-any.whl |
Total release size: 46.1 kB
Release files / url_cleaner-0.1.5.tar.gz
| Download URL | url_cleaner-0.1.5.tar.gz |
|---|---|
| Size | 22.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
247b461d911617b831537a0a034f1789e735d0b70071eceb13686222c174639c
|
|
BLAKE2b-256 checksum How to use checksums |
860c43c8eabf6efbf6c5d91f96620b1f787f63e8d3a336b040fd5fb0e098dbc4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.8.8
|
Release files / url_cleaner-0.1.5-py3-none-any.whl
| Download URL | url_cleaner-0.1.5-py3-none-any.whl |
|---|---|
| Size | 24.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e9f6f2dcf6e4849fd3a9600ff1b24121d84803ddd42601fe7967826099f2604d
|
|
BLAKE2b-256 checksum How to use checksums |
00824fefecb8d0a8655af4d8d8aab6e273d52d925a82477cdd26ff1401de8578
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.8.8
|
Security for url-cleaner 0.1.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.