首页 > 代码库 > 沪深股市关注度
沪深股市关注度
Sub 沪深股市关注度() On Error Resume Next Cells.Clear Columns("A:A").NumberFormatLocal = "@" Cells(1, 1) = "代码" Cells(1, 2) = "名称" Cells(1, 3) = "关注该股人数(人)" With CreateObject("WinHttp.WinHttpRequest.5.1") .Open "GET", "http://ddx.gubit.cn/js/stockCode.js", False .send s = BytesToBstr(.responseBody, "GB2312") With CreateObject("scriptcontrol") .Language = "jscript" .addcode s For i = 0 To .Eval("stockCodeArray.length") - 1 w = .Eval("stockCodeArray[" & i & "][0]") Cells(i + 2, 1) = .Eval("stockCodeArray[" & i & "][0]") Cells(i + 2, 2) = .Eval("stockCodeArray[" & i & "][1]") With CreateObject("WinHttp.WinHttpRequest.5.1") .Open "GET", "http://iguba.eastmoney.com/action.aspx?callback=a=&action=opopstock&code=" & w, False .SetRequestHeader "Connection", "keep-alive" .SetRequestHeader "Referer", "http://guba.eastmoney.com/list,002463.html" .send t = .ResponseText With CreateObject("scriptcontrol") .Language = "jscript" .addcode t Cells(i + 2, 3) = .Eval("a.data.following") End With End With Next i End With End With End Sub Function BytesToBstr(strBody, CodeBase) Dim objStream Set objStream = CreateObject("Adodb.Stream") With objStream .Type = 1 .Mode = 3 .Open .Write strBody .Position = 0 .Type = 2 .Charset = CodeBase BytesToBstr = .ReadText End With objStream.Close Set objStream = Nothing End Function
沪深股市关注度
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。