feat: update readme and show my ip
This commit is contained in:
@@ -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
|
||||||
|
```
|
||||||
|
|||||||
@@ -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'])
|
||||||
|
|||||||
Reference in New Issue
Block a user