首页 > xpath怎样不包括某个节点?

xpath怎样不包括某个节点?

公司有30多个网站,因为G20怕被篡改。
写了个scrapy爬下30多个网站的<body>内容,然后保存json对比。
其中两个网站有访问人数统计,所以每次访问得到的数字都不一样,所以不能判断是否被篡改。
想到的方法是去除掉那两个网站的统计<div>
但是用Xpath始终没有成功。。

<div class="Copyright">
    <div><a href="/index">xxx</a>  
        <a href="#">xxx</a>  
        <a href="#">xx</a>  
        <a href="#">xx</a>  
        <a href="/xxx/nexxxfo/id/6xx4">联系我们</a> | 
        <a href="/xxx/nexxxfo/id/60xx">帮助中心</a><div> 
        <div>xxxx</div>
        <div>xxxxx 访问量:283444</div>
        <div style="width:300px;margin:0 auto 5px auto; ">
            <a target="_blank" href="h" style="dihxxxpx;">xxxx</p></a>
        </div>
    </div>
</div>

使用Xpath //body/*[not(contains(div/@class, 'Copyright'))]
另外也试了好多种方法。都不行
还有一个问题是,因为有两个页面,所以我不能只去除Copyright这个div还有一个叫m-content也要去除。。
请问如何操作。。

【热门文章】
【热门文章】