今天爬這個網(wǎng)址https://www.8btc.com/article/251688
抓時間和內(nèi)容時麻煩了半天
可以用ctrl+f先自己測試下能否用xpath正確定位到位置

image.png

image.png
/node()表示匹配任何類型的節(jié)點(diǎn)。
//div[not(@*)]表示所有不具有屬性的div元素。如例子中的Script節(jié)點(diǎn)有class屬性,所以被排除
p/text()又能提取出來了。。。為啥上次不行、、、