Webbrowser Get Link

hypermx

Member
Joined
Jun 23, 2009
Messages
5
Programming Experience
Beginner
Hey, Atm i'm working on a program to make a google search, and then post a search log within a custom number of links.

Like atm i have this code:
VB.NET:
Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        WebBrowser1.Navigate("http://www.google.dk/search?hl=us&q=" + TextBox1.Text.ToString + "&btnG=S%F8g&meta=")
    End Sub
End Class

So right now it can search on google using a textbox and webbrowser.

Now i need to make something to get the links on google and add that to a txt file within a number of links.

And i were thinking something about this ( Only idea, No code ):
VB.NET:
If Webbrowser1.document.done.getting.site then
do untill links == textbox2.text.tonumber
{
new link as webbrowser1.document.googlelink1
}
new file as googlelink1 "C:\links.txt"

Can anybody give me something to search on or some help?
 
Last edited:
Might this be possible? :
VB.NET:
    Private Sub WebBrowser1_DocumentCompleted(ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted
        System.IO.File.Create("D;\fail.txt", WebBrowser1.Document.Links.ToString)
    End Sub
 
Back
Top