A package for removing tracing parameters from URLs. This package supports automatically updating filtering rules from Adguard
Project description
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.
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
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)
Update rules
from url_cleaner import UrlCleaner
c = UrlCleaner()
c.ruler.update_rules()
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
Built Distribution
Hashes for url_cleaner-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f68a29551fff19da1cb1260ad2bbe30d998e17b52f84342ff3693082a06163de |
|
MD5 | 3901b222d88b293175141aac62793750 |
|
BLAKE2b-256 | 1be466734b51849bbe8a3c03cb1c2880dd4d737fe50a7c517cca2d30617f2f01 |