XPath within R using XML package

后端 未结 2 1616
孤独总比滥情好
孤独总比滥情好 2020-12-28 10:33

I am new to XPath, but I can see how powerful it is. I am looking at the source code of this link and simply want to extract the contents and username from the following tw

2条回答
  •  感情败类
    2020-12-28 11:15

    You're close. This should do it.

    //head/meta[@name=\"description\"]/@content
    

    The brackets are constraining the choice of meta tags, but you still have to specify the attribute you want.

提交回复
热议问题