1
我想提取其中具有HTML結構angel.co網頁的內容如何在scrapy中爲HTML文件編寫XPath?
<meta content="Panjo, Marketplace for enthusiasts, Santa Monica, E-Commerce, Payments, Social Commerce, Forums, jobs, recruiting, hiring" name="description">
因此,對於上述結構我使用的Xpath
hxs.('//meta/@content').extract()
它打印相關的「內容」的所有文字標籤,但我希望這應該只打印與「描述」相關的內容。
是的,它的工作,其實我是使用這個hxs.select('// meta [@ name ='description']/@ content')。extract(),忘記插入間隙了,謝謝... – Rahul