无法产生代码中的值。 “猫”和“品牌”的长度相同,例如brands = {b1,b2,b3...b10}
cats ={{c11,c12,c13..c1n}, {c21,c22...}..{c101,c102}}
cats = response.xpath('//*[@class="leftNavCategoriesNodePopup"]')
brands = response.xpath('//*[@class="leftNavCategoriesNode"]')
for cat,brand in cats, brands:
ca = cat.xpath('.//*[@class="leftNavCategoriesNodePopupColumn"]/a/@href').extract()
br = brand.xpath('.//*[@class="leftNavCategoriesNodeName"]/text()').extract()
for c in ca:
yield{'br':br, 'c':c}