标题:网页抓1页的代码有了,翻页抓1-7页谁来帮帮忙?感谢
只看楼主
一碧清蓝
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2019-10-31
 问题点数:0 回复次数:0 
网页抓1页的代码有了,翻页抓1-7页谁来帮帮忙?感谢
Sub t()
   Dim html As Object, http As Object, i, n, j
   n = 2
   Set html = CreateObject("htmlfile")
    Set http = CreateObject("Msxml2.XMLHTTP")
    http.Open "GET", "http://www., False
    http.send
    html.body.innerhtml = http.responseText
    Set tb = html.body.getelementsbytagname("tr")
    For i = 1 To tb.Length - 1
        n = n + 1
          For j = 0 To tb(i).ChildNodes.Length - 1
          Cells(n, j + 1) = tb(i).ChildNodes(j).innertext
          Next
    Next
End Sub
奇趣统计105期 - 副本.zip (56.97 KB)
搜索更多相关主题的帖子: html 翻页 http 代码 网页 
2019-10-31 18:43



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-497539-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.012180 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved