想拿取div 下的 data-platid 的属性值
取法
for data_platid in response.xpath(’//div[@class=“td-item btn-comp”]/@data-platid’).extract()
注:采用 类似html.xpath(’//div[2]/span/@id’) 测试取不到
想拿取div 下的 data-platid 的属性值
取法
for data_platid in response.xpath(’//div[@class=“td-item btn-comp”]/@data-platid’).extract()
注:采用 类似html.xpath(’//div[2]/span/@id’) 测试取不到