<script> 
document.write(unescape("%3Cscript src='" + (document.location.protocol == "https:" ? "https://sb" : "http://b") + ".scorecardresearch.com/beacon.js' %3E%3C/script%3E")); 
</script> 
<script> 
  COMSCORE.beacon({ 
    c1:2, 
    c2:6486636, 
    c3:"", 
    c4:"", 
    c5:"", 
    c6:"", 
    c15:"" 
  }); 
</script>     用程序抓取国外某网站网页源代码,抓到的不是该网页的源码,在网页右键查看源代码时,发现多了以上语句,请问这是什么意思啊。如果能实现用程序抓取这种有点像被加密了的网页的源码呢? 

解决方案 »

  1.   


     <script>  
    document.write(unescape("%3Cscript src='" + (document.location.protocol == "https:" ? "https://sb" : "http://b") + ".scorecardresearch.com/beacon.js' %3E%3C/script%3E"));  这里是动态添加一个<script>标签来引用一个js文件
    </script>  
    <script>  
    COMSCORE.beacon({  这里是执行方法
    c1:2,  
    c2:6486636,  
    c3:"",  
    c4:"",  
    c5:"",  
    c6:"",  
    c15:""  
    });  
    </script>
      

  2.   

     <script>  
    document.write(unescape("%3Cscript src='" + (document.location.protocol == "https:" ? "https://sb" : "http://b") + ".scorecardresearch.com/beacon.js' %3E%3C/script%3E"));  
    //这里是动态添加一个<script>标签来引用一个js文件
    </script>  
    <script>  
    COMSCORE.beacon({  //这里是执行方法
    c1:2,  
    c2:6486636,  
    c3:"",  
    c4:"",  
    c5:"",  
    c6:"",  
    c15:""  
    });  
    </script>