fix error for xdbSearcher.py

This commit is contained in:
weideguo 2022-07-25 11:33:21 +08:00
parent fd0a6e09f4
commit e8bbe27e42
1 changed files with 2 additions and 2 deletions

View File

@ -178,10 +178,10 @@ if __name__ == '__main__':
] ]
# 1. 缓存 # 1. 缓存
dbPath = "./data/ip2region.xdb"; dbPath = "./data/ip2region.xdb";
cb = Searcher.loadContentFromFile(dbfile=dbPath) cb = XdbSearcher.loadContentFromFile(dbfile=dbPath)
# 2. 创建查询对象 # 2. 创建查询对象
searcher = Searcher(contentBuff=cb) searcher = XdbSearcher(contentBuff=cb)
# 3. 执行查询 # 3. 执行查询
# ip = "1.2.3.4" # ip = "1.2.3.4"