单击带有vbscript的网页表

时间:2018-04-10 07:30:57

标签: vbscript web-scraping

我想点击表格的第一行,如下所示。 (ex'5101170017')带有vbscript代码。我试图抓取网页信息。我怎样才能做到这一点。由于此网页受密码保护,我无法分享详细信息。

<html>
<head>
<script src='../../accidentweb/interface/DwrUtilsDao.js'></script>
<script src='../../accidentweb/engine.js'></script>
<script src='../../accidentweb/util.js'></script>
<base href="http://114.255.167.200:8092/cidasEN/extend/">
<meta http-equiv="Content-Type" content="text/html; charset=GBK">
<LINK href="css/css.css" type=text/css rel=stylesheet>

<title>Functional Query results</title>
</head>
<body bottomMargin=0 leftMargin=0 topMargin=0 >
 <TABLE  border="1"  bordercolorlight="#6D6D6D" cellspacing="1"
      bordercolordark="#C0C0C0" width="120%"
             cellpadding="0"  bgcolor="#FFFFFF" class=font9  style="BORDER-bottom: #4D5E8C 1px solid" >
  <tr  bgcolor="#CCCCCC"     > 
      <td  class="title_1" width ='6%' align="center">department</td>
      <td  class="title_1" width ='6%' align="center">case number</td>   
      <td  class="title_1" width ='10%' align="center">time of accident</td>
      <td class="title_1" width ='20%' align="center">location of scene of accident</td>
      <td class="title_1" width ='6%' align="center">operator</td>
  </tr>


     <tr bgcolor="#FFFFFF" style="cursor:hand" 
      onmouseover="onmouseoverTR(this)" 
      onmouseout="onmouseoutTR(this)"         
      onclick="clearwsInfo('2017070100002','2017070100002',this);"
      ondblclick='doSelect("auditflowForm","2017070100002");'> 
   <TD  align="center">
    <script type="text/javascript" >                               
                            outprint('ChengDu Branch');                              
        </script>   
   </TD>
   <TD  align="center">
    <script type="text/javascript" >                               
                            outprint('5101170017');                              
        </script>   
   </TD>
   <TD  align="center">
    <script type="text/javascript" >                               
                            outprint('2017-06-02 17:50');                                
        </script>
   </TD>
   <TD  align="left">
      <script type="text/javascript" >                             
                            outprint('成赤高速成自段自贡往成都方向48km');                              
        </script>
   </TD>
    <TD  align="left">
      <script type="text/javascript" >                             
                            outprint('杨东升');                                 
        </script>
   </TD>  
   </TR>


     <script anguage="javascript" >
      //clearwsInfo("2017070100002","2017070100002","");
    </script>


</TABLE>

</body>
</html>

我尝试了以下内容:

Set iframe = IE.Document.getelementbyID("listInfoFrame")
For Each ele In iframe.contentDocument.getElementsByTagName("td")
   msgbox(ele.innertext)
  If InStr(ele.innertext, "department") > 0 Then
      Set Row = ele.ParentNode.NextSibling
      Row.Click
      Exit For
  End If
Next

我收到错误'ifmission Denied'iframe.contentDocument。任何人都可以帮助我

0 个答案:

没有答案