>>> response.xpath('//span[@class="time" and @id="news-time"]/text()').extract() ['2017-10-09 09:46']
>>> response.xpath('//title/text()').extract_first() 'Netkiller ebook - Linux ebook'
contains() 匹配含有特定字元串的 class
//*[contains(@class,'foo')]
>>> response.xpath('//ul[contains(@class, "topnews_nlist")]/li/h2/a/@href|//ul[contains(@class, "topnews_nlist")]/li/a/@href').extract()
內容匹配
>>> response.xpath('//div[@id="epContentLeft"]/h1[contains(text(),"10")]/text()').extract() ['美聯儲10月起啟動漸進式縮表 維持基準利率不變']