Mon May 1 13:48:00 UTC 2023 inscode

上级 df352508
print('欢迎来到 InsCode')
\ No newline at end of file
# 导入requests库
import requests
import json
from tabulate import tabulate
import wcwidth
# 向指定的url发送get请求
response = requests.get('https://ul.ztrztr.top/api/u')
# 打印response的文本内容
print(response.text)
# 将response的内容解析为json格式,然后将其转换为字符串格式
json_data = json.loads(response.text)
json1 = json.dumps(json.loads(response.text), indent=4, sort_keys=False, ensure_ascii=False)
ultraMobs = ["Queen Ant", "Queen Fire Ant", "Leech", "Ladybug", "Sandstorm", "Roach", "Crab", "Spider", "Moth", "Centipede", "Fly", "Hornet", "Crab", "Shell", "Jellyfish", "Rock", "Beetle", "Bubble", "Dandelion", "Cactus", "Hel Beetle", "Termite Overmind"]
for i in ultraMobs :
print(i + ":" + json_data.get("Name: " + i + " Server: NA", "N/A"))
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册