from requests import get from socket import gethostname, gethostbyname ip = gethostbyname(gethostname()) # 172.28.0.12 (2024.2.19現在) filename = get(f"http://{ip}:9000/api/sessions").json()[0]["name"] print(ip,filename)
from requests import get from socket import gethostname, gethostbyname ip = gethostbyname(gethostname()) # 172.28.0.12 (2024.2.19現在) filename = get(f"http://{ip}:9000/api/sessions").json()[0]["name"] print(ip,filename)