Commit 864da817 by lichenggang

add czvv

parent ea0ed2d4
Showing with 2 additions and 2 deletions
......@@ -15,7 +15,7 @@ def get_resps(level1):
for level2_dom in level2_doms:
level2 = {}
level2['cat_name'] = level2_dom.xpath('./text()')[0]
level2['url'] = level2_dom.xpath('./@href')[0]
level2['url'] = level2_dom.xpath('./@href')[0].strip()
level2['level'] = 2
level2['islast'] = 1
level1['level2_list'].append(level2)
......@@ -27,7 +27,7 @@ def get_levels():
for level1_dom in level1_doms:
level1=dict()
level1['cat_name'] = level1_dom.xpath('./a/text()')[0]
level1['url'] = level1_dom.xpath('./a/@href')[0]
level1['url'] = level1_dom.xpath('./a/@href')[0].strip()
level1['level'] = 1
level1['islast'] = 0
level1['parent_id'] = 0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment