获取IMDB发布日期的XPath选择器

2024-10-02 12:23:08 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在练习使用Xpath选择器,我无法从这个网站提取发布日期https://www.imdb.com/title/tt0468569/?ref_=adv_li_tt

我能讲到这一部分。但是我无法得到下面的文本

Xpath screenshot


Tags: https文本comreftitle网站www选择器
2条回答

只需使用:

//a[contains(@title,'release')]/text()

//h4[contains(.,'Release')]/parent::*/text()[normalize-space()]

您可以使用此表达式在Chrome inspector中进行测试:

$x(".//h4[contains(.,'Release')]/parent::*/text()[normalize-space()]")

enter image description here

相关问题 更多 >

    热门问题