I scrapped some html via xpath, that I then converted into an etree. Something similar to this:
text1 link text2 <
If the element is equal to . You can do the following. element.xpath('.//text()') It will give you a list of all text elements from self (the meaning of the dot). // means that it will take all elements and finally text() is the function to extract text. 0 讨论(0) 查看其它8个回答 发布评论: 提交评论 加载中... 验证码 看不清? 提交回复 热议问题
element
. You can do the following. element.xpath('.//text()') It will give you a list of all text elements from self (the meaning of the dot). // means that it will take all elements and finally text() is the function to extract text. 0 讨论(0) 查看其它8个回答 发布评论: 提交评论 加载中... 验证码 看不清? 提交回复 热议问题
element.xpath('.//text()')
It will give you a list of all text elements from self (the meaning of the dot). // means that it will take all elements and finally text() is the function to extract text.
self
//
text()