feat: update readme and show my ip

This commit is contained in:
2025-08-27 23:59:20 +08:00
parent 06f0b20883
commit 6f137f192e
2 changed files with 8 additions and 2 deletions

View File

@@ -15,3 +15,8 @@ trusted-host=mirrors.aliyun.com
pip install requests pip install requests
``` ```
----
```shell
PYTHONPATH=./.venv/lib/python3.10/site-packages/ ./ShowMyIp.py
```

View File

@@ -8,5 +8,6 @@ if __name__ == "__main__":
if response.status_code != 200: if response.status_code != 200:
print("[ERROR]", response.status_code) print("[ERROR]", response.status_code)
else: else:
print(response.json()) response_json = response.json()
print("Your IP is:", response.json()['ip']) print(response_json)
print("Your IP is:", response_json['ip'])