diff --git a/README.md b/README.md index e1b38cb..e53d015 100644 --- a/README.md +++ b/README.md @@ -15,3 +15,8 @@ trusted-host=mirrors.aliyun.com pip install requests ``` +---- + +```shell +PYTHONPATH=./.venv/lib/python3.10/site-packages/ ./ShowMyIp.py +``` diff --git a/ShowMyIp.py b/ShowMyIp.py index 26c5f98..c35d26d 100755 --- a/ShowMyIp.py +++ b/ShowMyIp.py @@ -8,5 +8,6 @@ if __name__ == "__main__": if response.status_code != 200: print("[ERROR]", response.status_code) else: - print(response.json()) - print("Your IP is:", response.json()['ip']) + response_json = response.json() + print(response_json) + print("Your IP is:", response_json['ip'])