scrapy

response.selector.xpath('//')#//从根开始匹配 

.xpath('//img[@*])#找出所有img的所有属性

.xpath('//img/@src').extract()#找出所有img的src属性

.xpath('//a[@href='index.html']').extract()#找出a标签href='index.html'

.xpath('//a[contains(@href)]/img')

 

posted @ 2017-10-28 21:09  howhy  阅读(148)  评论(0编辑  收藏  举报