-- 作者:大红袍
-- 发布时间:2016/2/24 16:09:00
--
参考代码。
Dim pg As Integer = 2 Dim count As Integer = 40
Dim url As String = "http://stock.n8n8.cn/index.php?m=data&c=index&a=getZjlx&begin=" & pg & "&amount=" & count & "&bAsc=0&board=1&sortType=110&r=0.3194321512699826" Dim rqst As System.Net.HttpWebRequest = System.Net.HttpWebRequest.Create(url)
Dim rsps As System.Net.HttpWebResponse = rqst.GetResponse
Dim stm As System.IO.Stream = rsps.GetResponseStream()
Dim reader As New System.IO.StreamReader(stm, EnCoding.Default)
Dim str As String = reader.ReadToEnd
output.show(str) Dim data As object Dim JscriptCode = "function toObject(json) {eval(""var o=""+json);return o;}" Dim ScriptControl = CreateObject("MSScriptControl.ScriptControl") With ScriptControl .Language = "Javascript" .Timeout = -1 .AddCode(JscriptCode) data = .Run("toObject", str) End With For Each d As object In data.response.bodRptArray output.show(d.code & " " & d.name) Next
|