Foxtable(狐表)用户栏目专家坐堂 → [求助]获取网页信息


  共有1948人关注过本帖树形打印复制链接

主题:[求助]获取网页信息

帅哥哟,离线,有人找我吗?
有点甜
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2017/11/28 16:47:00 [显示全部帖子]

Dim web As New System.Windows.Forms.WebBrowser()
web.ScriptErrorsSuppressed = True
web.Navigate("http://www.cninfo.com.cn/information/financialreport/szmb000651.html")
Do Until web.ReadyState = 4
    Application.DoEvents
Loop

Dim tb As object = web.Document.GetElementsByTagName("table")(2)
Dim trs = tb.GetElementsByTagName("tr")
For i As Integer = 0 To trs.count-1
    Dim tds As object =  trs(i).GetElementsByTagName("td")
    For j As Integer = 0 To tds.count-1
        output.show(i & "行" & j & "列:" & tds(j).innerText)
    next
next


 回到顶部