<td><a target="_blank" href="d37407518.htm" onclick="this.parentNode.className = 'visited';">1500元也玩</a><small> (532字)</small></td>
    <td align="middle" nowrap class="p9"><a href="/mail/sendto.asp?id=发帖人0" target="_blank">gostop2000</a></td>
<td><a target="_blank" href="d37404258.htm" onclick="this.parentNode.className = 'visited';">【歪门邪道】多情不露馅!情人节“偷情”宝典</a><small> (2385字)</small></td>
    <td align="middle" nowrap class="p9"><a href="/mail/sendto.asp?id=%C2%F2%CA%D6%BB%FA%B5%B1%C8%BB%C0%B4%C4%CF%BE%A9%CA%D6%BB%FA%CD%F8" target="_blank">买发帖人1</a></td>**<table border=0 cellpadding=0 cellspacing=0 class="width_fix">
<tr ><td height="28" align=right nowrap class=p9>
<b>1</b> <a href="?pn=2">2</a> <a href="?pn=3">3</a> <a href="?pn=4">4</a> <a href="?pn=5">5</a> <a href="?pn=6">6</a> <a href="?pn=7">7</a> <a href="?pn=8">8</a> <a href="?pn=9">9</a> <a href="?pn=10">10</a> <a href="?pn=2">下一页</a> <a href="?pn=11">后十页</a> <a href="?pn=75">尾页</a> <input style="border:solid 1px #333333;font-size:12px;" id="pnBox" type="text" size="1"> <a href=# onClick="location='?pn='+pnBox.value;return false;">翻页</a> 共 75 页
</td>
</tr>
想提取**上面的d37407518.htm和d37404258.htm,或者自动单击这些链接
**下面要求能自动点击,提取每页的类似于**上面的内容

解决方案 »

  1.   

    使用Inet控件,txtURL为输入网址的text控件,source得到的既是HTML源码
    dim source as stringsource=inet1.openURL(txtURL.txt)
      

  2.   

    www.microsoft.com/china/ msdn/Archives/workshop/scrape.asp
      

  3.   

    两种方法
    Microsoft Internet Controls '部件
    Microsoft Html Object Libary '引用Private Sub Form_Load()
        WebBrowser1.Navigate "http://www.sina.com.cn"
    End SubPrivate Sub WebBrowser1_DownloadComplete()
        Dim doc As IHTMLDocument
        Dim objhtml As Object
        Dim strhtml As String
        
        If Not WebBrowser1.Busy Then
            Set doc = WebBrowser1.Document
            Set objhtml = doc.body.createTextRange()
            If Not IsNull(objhtml) Then
                Text1.Text = objhtml.htmlText
            End If
        End If
    End Sub不能保存asp之类的源程序,只能是看到的html文件。=========================================================
    '引用Microsoft   Internet   Controls
    Private   Sub   Command1_Click()
    Dim   ex   As   InternetExplorer
    Set   ex   =   New   InternetExplorer
    ex.Visible   =   True
    ex.Navigate   "http://expert.csdn.net/"
    MsgBox   "OK"     '等待IE异步完成
    Me.RichTextBox1.Text   =   ex.Document.body.innerHTML
    End   Sub