|
Sub getjson()
Dim Token, JsonObj, P
Set oDom = CreateObject("htmlfile")
With CreateObject("Msxml2.XMLHTTP")
.Open "GET", "https://sc."网址.me/collections/31/cn-finance-relative/15742/cn-interest-rate-corridor", False
.send
oDom.body.innerHTML = .responseText
Token = oDom.querySelector(".sosume p").getAttribute("data-stk")'IE8 以上可使用
.Open "GET", "https://sc."网址.me/charts/data/15742", False
.setRequestHeader "Authorization", "Bearer " & Token
.send
oDom.parentWindow.execScript "var json= " & .responseText
Set JsonObj = oDom.parentWindow.json
Debug.Print .responseText
End With
Stop
End Sub
|
|