所以我试图从 www.flalottery.com/play4.do 获取中午和晚上的数据。我打开了 VB.NET,弹出了 Awesomium WebControl 1.7.2(最新版本),并在表单中添加了一个标签,代码如下:
Private Sub Awesomium_Windows_Forms_WebControl_DocumentReady(sender As Object, e As Awesomium.Core.UrlEventArgs) Handles WebControl1.DocumentReady
Label1.Text = WebControl1.ExecuteJavascriptWithResult("document.getElementsByClassName('gameContent')[0].getElementsByClassName('balls')")
End Sub
但它显示为未定义。帮助?我可能错过了一些超级简单的东西。之后我放了一个按钮尝试一下,我得到:
[object]
在 Chrome 中我得到:
[<span class="balls" title="4">4</span>, <span class="balls" title="1">1</span>, <span class="balls" title="5">5</span>, <span class="balls" title="6">6</span>, <span class= "balls" title="6">6</span>, <span class="balls" title="5">5</span>, <span class="balls" title="5">5</span>, <span class="balls" title="4">4</span>]
这就是我需要的。