xpath自定義屬性值的取法

想拿取div 下的 data-platid 的屬性值 取法 for data_platid in response.xpath(’//div[@class=「td-item btn-comp」]/@data-platid’).extract() 注:採用 類似html.xpath(’//div[2]/span/@id’) 測試取不到
相關文章
相關標籤/搜索