|
|
@@ -86,11 +86,11 @@ def main():
|
|
|
pid = row.pid # 110100000000
|
|
|
province_id = city_id[:2]
|
|
|
province = province_dict.get(province_id)
|
|
|
- if len(pid) == 2 and city == "市辖区":
|
|
|
+ if len(pid) == 2 and temp == "市辖区":
|
|
|
# 处理 市辖区 只有两级,区为空
|
|
|
city = province
|
|
|
district = "市辖区"
|
|
|
- elif len(pid) ==2 and city != "市辖区":
|
|
|
+ elif len(pid) ==2 and temp != "市辖区":
|
|
|
# 三级 省 市 区(县)
|
|
|
city = temp
|
|
|
district = ""
|