<div class="img"><a target="_blank" href="http://news.pedaily.cn/201806/432662.shtml"><img src="https://static.pedaily.cn/head/css/images/noimage.png" data-src="https://pic2.pedaily.cn/default/scenery2/other/306330.jpg" alt="6小時起伏,榮耀手機618排名大逆轉,榮耀倪嘉悅:手機行業到了換機時期"></a></div><h3><a href="http://news.pedaily.cn/201806/432662.shtml" target="_blank">6小時起伏,榮耀手機618排名大逆轉,榮耀倪嘉悅:手機行業到了換機時期</a></h3><div class="tag"><span class="date">2018-06-21 10:10</span><a href="http://www.pedaily.cn/tag/235880/" target="_blank">京東618</a><a href="http://www.pedaily.cn/tag/190820/" target="_blank">華為榮耀</a><a href="http://www.pedaily.cn/tag/82753/" target="_blank">小米</a></div></li>xpath: title_list=etree.HTML(response.content.decode('utf-8')).xpath('//div[@class="img"]/a[contains(@target,"_blank")]/@alt')
為啥我的xpath 匹配不到呢?
青春有我
2018-07-03 13:13:53