Skip to main content

pass url to extract domain

Project description

# ExtractLevelDomain
通过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:

```
filter = 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
```

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

ExtractLevelDomain-1.1.tar.gz (2.1 kB view details)

Uploaded Source

File details

Details for the file ExtractLevelDomain-1.1.tar.gz.

File metadata

File hashes

Hashes for ExtractLevelDomain-1.1.tar.gz
Algorithm Hash digest
SHA256 0cbc2dfe85413c5c521fdc33adf0bfaacac16cdbe9332a6abe365ee21bf8aa9b
MD5 5666239e8b9e07d36730244637ef6de7
BLAKE2b-256 d391ad9be7a12cdc957d7ad5728266f0861a37d81e41130085a576984c11e280

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page