fix file format generated by ffhlwiki.py
parent
46879f7caf
commit
3893963553
|
@ -45,7 +45,7 @@ def import_wikigps(url):
|
||||||
|
|
||||||
nodes = fetch_wikitable(url)
|
nodes = fetch_wikitable(url)
|
||||||
|
|
||||||
aliases = []
|
aliases = {}
|
||||||
|
|
||||||
for node in nodes:
|
for node in nodes:
|
||||||
try:
|
try:
|
||||||
|
@ -68,7 +68,7 @@ def import_wikigps(url):
|
||||||
for data in nodes:
|
for data in nodes:
|
||||||
alias = {}
|
alias = {}
|
||||||
|
|
||||||
alias['mac'] = data[0].strip()
|
mac = data[0].strip()
|
||||||
|
|
||||||
if data[1]:
|
if data[1]:
|
||||||
alias['gps'] = data[1].strip()
|
alias['gps'] = data[1].strip()
|
||||||
|
@ -76,7 +76,7 @@ def import_wikigps(url):
|
||||||
if data[2]:
|
if data[2]:
|
||||||
alias['name'] = data[2].strip()
|
alias['name'] = data[2].strip()
|
||||||
|
|
||||||
aliases.append(alias)
|
aliases[mac] = alias
|
||||||
|
|
||||||
return aliases
|
return aliases
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue