尽量不要重复new对象
Dim page As Integer
Dim web1 As new windows.forms.webbrowser
web1.ScriptErrorsSuppressed = True
For page = 1 To 2
Dim txb1 As String = "http://weidian.eallcn.com/232621561/mmfy/mmfylist/curpage=" & page
'output.show("第" & page & "页主页面网址:" & txb1)
web1.Navigate(txb1)
Do Until web1.ReadyState = 4
Application.DoEvents
Loop
Dim idx1 = 0
Dim u2 As String
For Each dl As object In web1.Document.GetElementsByTagName("a")
Dim url As String = dl.GetAttribute("href")
If url > "" And url.Contains("http://weidian.eallcn.com/232621561/mmfy/mmfydetail/id=") And url <> u2 Then
idx1 += 1
output.show("第" & idx1 & "页面:" & url)
u2 = url
End If
Next
Next
web.Dispose()
GC.Collect()