mirror of
https://github.com/lionsoul2014/ip2region.git
synced 2025-12-08 19:25:22 +00:00
fix error for xdbSearcher.py
This commit is contained in:
parent
fd0a6e09f4
commit
e8bbe27e42
@ -178,10 +178,10 @@ if __name__ == '__main__':
|
||||
]
|
||||
# 1. 缓存
|
||||
dbPath = "./data/ip2region.xdb";
|
||||
cb = Searcher.loadContentFromFile(dbfile=dbPath)
|
||||
cb = XdbSearcher.loadContentFromFile(dbfile=dbPath)
|
||||
|
||||
# 2. 创建查询对象
|
||||
searcher = Searcher(contentBuff=cb)
|
||||
searcher = XdbSearcher(contentBuff=cb)
|
||||
|
||||
# 3. 执行查询
|
||||
# ip = "1.2.3.4"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user