diff --git a/noipy/__init__.py b/noipy/__init__.py index 118d90d..b131ae6 100644 --- a/noipy/__init__.py +++ b/noipy/__init__.py @@ -9,7 +9,7 @@ """ __title__ = "noipy" -__version_info__ = ('1', '5', '1') +__version_info__ = ('1', '5', '2') __version__ = ".".join(__version_info__) __author__ = "Pablo O Vieira" __email__ = "noipy@pv8.io" diff --git a/noipy/utils.py b/noipy/utils.py index 7540c94..85fb808 100644 --- a/noipy/utils.py +++ b/noipy/utils.py @@ -9,7 +9,7 @@ import requests -HTTPBIN_URL = "http://httpbin.org/ip" +HTTPBIN_URL = "https://httpbin.org/ip" try: input = raw_input @@ -26,7 +26,8 @@ def get_ip(): """ try: r = requests.get(HTTPBIN_URL) - return r.json()['origin'] if r.status_code == 200 else None + ip, _ = r.json()['origin'].split(',') + return ip if r.status_code == 200 else None except requests.exceptions.ConnectionError: return None diff --git a/tox.ini b/tox.ini index 3414b3e..5f3368b 100644 --- a/tox.ini +++ b/tox.ini @@ -9,7 +9,7 @@ deps = commands = python --version - coverage run --source noipy -m pytest {posargs} + coverage run --source noipy -m pytest -s -v {posargs} coverage report -m [testenv:pep8]