2024-10-02 12:23:08 发布
网友
我正在练习使用Xpath选择器,我无法从这个网站提取发布日期https://www.imdb.com/title/tt0468569/?ref_=adv_li_tt
我能讲到这一部分。但是我无法得到下面的文本
Xpath screenshot
只需使用:
//a[contains(@title,'release')]/text()
或
//h4[contains(.,'Release')]/parent::*/text()[normalize-space()]
您可以使用此表达式在Chrome inspector中进行测试:
$x(".//h4[contains(.,'Release')]/parent::*/text()[normalize-space()]")
只需使用:
或
您可以使用此表达式在Chrome inspector中进行测试:
相关问题 更多 >
编程相关推荐