- May 1, 2010
- 2,442
- 470
I cannot get this one to work. How to decode fucking Google search html code:
PHP:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
WebBrowser1.Navigate("http://www.google.com/search?q=" & TextBox1.Text)
End Sub
Private Sub WebBrowser1_DocumentCompleted(ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted
Dim htmlele As HtmlElementCollection
htmlele = WebBrowser1.Document.GetElementsByTagName("h3")
For Each htm As HtmlElement In htmlele
Dim chld As HtmlElementCollection = htm.GetElementsByTagName("a")
For Each ch As HtmlElement In chld
RichTextBox1.AppendText(ch.GetAttribute("href") & vbCrLf)
Next
Next
End Sub
Last edited: