https://www.volkswagen-vans.co.uk/en/offers-finance/offers/caddy-panel-van.html
{
"total_rows": 3,
"offset": 0,
"rows": [
{
"key": "ארץ",
"id": "2017-09-01-09-05-11",
"value": "Earth"
},
{
"key": "בין",
"id": "2015-01-19-11-30-28",
"value": "between"
},
{
"key": "שלום פיל",
"id": "2018-01-30-18-04-11",
"value": "Hello elephant"
}
]
}
答案 0 :(得分:0)
xpath不是问题,而是你的(缺失)代码;在Chrome开发工具中 - >控制台,我明白了:
$x('//div[@class="vw_m108_item_container vw_accordion_item_container"]//div[@class="inner"]/div[@class="td"]//text()').length
84
当您在此处发布时,如@some-progammer所述,请始终发布您的代码。
请阅读MCVE
答案 1 :(得分:0)
我通过改变我的xpath来解决它。
response.xpath('//div[@class="vw_m108_item_container vw_accordion_item_container"][contains(@data-sectionname, "finance lease")]//div[@class="tr"]//text()')