dataset/seed/base/funcs/base.py

10 lines
268 B
Python
Raw Normal View History

2022-06-29 11:44:01 +02:00
from typing import List
from risotto.utils import load_domains, DOMAINS
def get_ip(server_name: str) -> str:
load_domains()
host_name, domain_name = server_name.split('.', 1)
domain = DOMAINS[domain_name]
return domain[1][domain[0].index(host_name)]