从xpath删除表内容

时间:2019-12-12 12:01:33

标签: xpath web-scraping

我正在尝试在没有亚马逊https://www.amazon.de/dp/B003BYPUZC中的表的情况下获取aplus内容(我认为需要德国IP来获取aplus内容),即它通常带有一个内置于该ID的表,我想提取该表表中没有任何文本的文本。

my_xpath = "//*[@id='aplus']/descendant-or-self::*[not(name()='script') and not(name()='style')

我尝试使用

"//*[@id='aplus']/descendant-or-self::*[not(name()='script') and not(name()='style') and not(name()='table')]//text()" 

与上面的结果相同,有没有办法从aplus中删除整个表?

0 个答案:

没有答案