我想不出怎么才能拿到标题。
response.css('.goods_property_color a.current').extract()
<p id="select-attr-0" class="attr-choose clearfix goods_property_color" data-type="Color"> <span class="property-title">Color</span> <a href="javascript:void(0)" class="itemAttr current -sitemap-select-item-selected" title="WHITE" data-value="WHITE"><img src="https://gloimg.rglcdn.com/rosegal/pdm-product-pic/Clothing/2019/04/08thumb-img/1554676715239391822.jpg" class=""></a> 我想要的只是“白色”
但我得到的是:
['a href="javascript:void(0)" class="itemAttr current " title="WHITE" data-value="WHITE"> src=h://gloimg.rglcdn.com/rosegal/pdm-product-pic/Clothing/2019/04/08thumb-img/1554676715239391822.j"></a>']发布于 2019-07-23 01:27:31
response.css('.goods_property_color a.current::attr(data-value)').get()或
response.css('.goods_property_color a.current::attr(title)').get()https://stackoverflow.com/questions/57150699
复制相似问题