yzhanURLParser
A python library which could parse URL to ip and country.
Usage
Install
pip install yzhanurlparser
API
Is IP
from yzhanurlparser import is_ip
is_ip('123')
is_ip('8.8.8.8')
Get Info By IP
from yzhanurlparser import get_info_by_ip
get_info_by_ip('8.8.8.8')
Get Country By IP
from yzhanurlparser import get_country_by_ip
get_country_by_ip('8.8.8.8')
get_country_by_ip('114.114.114.114')
Get Info By URL
from yzhanurlparser import get_info_by_url
get_info_by_url('https://www.163.com')
Get Country By URL
from yzhanurlparser import get_country_by_url
get_country_by_url('https://www.163.com')
Development
Install
pip install -r requirements.txt
Unit Test
cd yzhanurlparser
python -m unittest discover -s test -p '*_test.py'
Build
pip install --user --upgrade setuptools wheel twine # First Run
python setup.py sdist bdist_wheel
Thanks
ip2location