MCPcopy Create free account
hub / github.com/EASY233/Finger / __init__

Method __init__

lib/IpFactory.py:15–20  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

13
14class IPFactory:
15 def __init__(self):
16 cdnFile = os.path.join(path.library, 'cdn_ip_cidr.json')
17 dbFile = os.path.join(path.library, "data", "ip2region.db")
18 self.searcher = Ip2Region(dbFile)
19 with open(cdnFile, 'r', encoding='utf-8') as file:
20 self.cdns = json.load(file)
21
22 def parse_host(self,url):
23 host = urlsplit(url).netloc

Callers

nothing calls this directly

Calls 1

Ip2RegionClass · 0.90

Tested by

no test coverage detected