Scrapy shell- 从 table 获取信息的正确 xpath 选择器?

Scrapy shell- correct xpath selector for getting info from a table?

我正在尝试获取正确的 Xpath 以提取下图中红色圈出的信息:

enter image description here

我试过复制 xpath 并将其粘贴到 scrapy shell 但它不起作用。我遇到了困难,因为信​​息包含在 table 中,并且 table 的每个元素都具有相同的名称。网站是

https://virtualmuebles.com/muebles-sala/mesa-tv-invy-1c-casa-linda-wg

假设文本 Marca 在您要抓取的所有页面上都是不变的。首先搜索包含文本 'Marca' 的 b 元素。如果它是 td 元素,则查找其父元素。如果它是 td 元素,则获取以下同级元素。获取其文本节点:

response.xpath("//b[contains(text(),'Marca')]/parent::td/following-sibling::td/text()").get()

否则如果总是第四个tr元素的第二个td元素:

response.xpath("//tr[4]/td[2]/text()").get()

输出:

'RTA Design'