1
我想從使用scrapy爬蟲的網站抓取數據。如何使用select()獲取<meta itemprop="rvalue" content="4.0">
內容值?Python Scrapy XPathSelector
我想從使用scrapy爬蟲的網站抓取數據。如何使用select()獲取<meta itemprop="rvalue" content="4.0">
內容值?Python Scrapy XPathSelector
item['key'] = xpath.select('//meta[@itemprop="rvalue"]/@content').extract()
它會返回一個列表,所以用一個項目加載器來處理它。
工作非常感謝 – user245398