login网站后获取networking数据

我试图从一个需要login用户和密码的网站获取数据。 我按照这个教程 ,设法login到网站,但由于某种原因,它没有得到表。

代码如下:

Sub GetTable() Dim ieApp As InternetExplorer Dim ieDoc As Object Dim ieTable As Object Dim clip As DataObject 'create a new instance of ie Set ieApp = New InternetExplorer 'you don't need this, but it's good for debugging ieApp.Visible = True 'assume we're not logged in and just go directly to the login page ieApp.Navigate "https://accounts.google.com/ServiceLogin" Do While ieApp.Busy: DoEvents: Loop Do Until ieApp.ReadyState = READYSTATE_COMPLETE: DoEvents: Loop Set ieDoc = ieApp.Document 'fill in the login form – With ieDoc.forms(0) .Email.Value = "email@email.com" .Passwd.Value = "password" .submit End With Do While ieApp.Busy: DoEvents: Loop Do Until ieApp.ReadyState = READYSTATE_COMPLETE: DoEvents: Loop 'now that we're in, go to the page we want ieApp.Navigate "my-website.com" Do While ieApp.Busy: DoEvents: Loop Do Until ieApp.ReadyState = READYSTATE_COMPLETE: DoEvents: Loop 'get the table based on the table's id Set ieDoc = ieApp.Document For i = 0 To (ieDoc.all.Length - 1) 'Only look at tables If TypeName(ieDoc.all(i)) = “HTMLTable” Then Set ieTable = ieDoc.all(i) 'I want to check the 3rd row (.Rows(2)) and will get an error if there 'are less than three rows. If ieTable.Rows.Length > 2 Then 'Here's the text in the first cell of the third row that tells me 'I have the right table If ieTable.Rows(0).Cells(0).innertext = "Text" Then 'copy the tables html to the clipboard and paste to teh sheet If Not ieTable Is Nothing Then Set clip = New DataObject clip.SetText "<html>" & ieTable.outerHTML & "</html>" clip.PutInClipboard Sheet1.Select Sheet1.Range("A1").Select Sheet1.PasteSpecial "Unicode Text" End If End If End If End If Next i 'close 'er up ieApp.Quit Set ieApp = Nothing End Sub