通过URL抽取各层各级的域名(一级域名,二级域名....) . 这模块本来是用来分析日志及数据分析的.
# Install Document:
pypi install
```
pip install ExtractLevelDomain
```
source install
```
git clone https://github.com/rfyiamcool/ExtractLevelDomain.git
cd ExtractLevelDomain
python setup.py install
```
# Usage Document:
```
import ExtractLevelDomain
filter = ExtractLevelDomain.ExtractLevelDomain()
#普通抽取域名,默认是最多匹配
print filter.parse_url('http://dmp.301.xiaorui.cc/redirect/xiaorui.cc')
#parse_url_level可以控制level级,可接收的参数两种参数 1 2 3 或"*"
print filter.parse_url_level('http://dmp.301.xiaorui.cc/redirect/xiaorui.cc',level=2)
#set_level设置level级别
filter.set_level(1)
print filter.parse_url_level('http://dmp.301.xiaorui.cc/redirect/xiaorui.cc',level=1)
#现实Level级别
print filter.level
```
Metadata
Release files for ExtractLevelDomain 2.6.3
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 | |
|---|---|---|---|---|
| ExtractLevelDomain-2.6.3.tar.gz | 2.5 kB | Without provenance | Details |
Release files / ExtractLevelDomain-2.6.3.tar.gz
| Download URL | ExtractLevelDomain-2.6.3.tar.gz |
|---|---|
| Size | 2.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2ed017ef595adb31b4b396f5d31f7bc57b1e992c00607de089cefdf395ec10d3
|
|
BLAKE2b-256 checksum How to use checksums |
bf52c7ae6c454d466624dabdca69e20e9fbdb77d538a9a9258ccf8682153c2a5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for ExtractLevelDomain 2.6.3
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.