Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
VB-browser, profis kommt mal her :D
#8
Naja eig hat er schon recht mit den 5GB ^^

Naja das ist der Source der das ERSTE Bild raus sucht.
Code:
Public Class Form1

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        WebBrowser1.Navigate("http://dslan.gfx-dose.de/thread-2805-post-40658.html#pid40658")
    End Sub

    Private Sub WebBrowser1_Navigated(ByVal sender As Object, ByVal e As System.Windows.Forms.WebBrowserNavigatedEventArgs) Handles WebBrowser1.Navigated
        Dim Source
        Source = WebBrowser1.Document.Body.InnerHtml

        Source = Replace(Source, Chr(134), "'")
        Dim Se2() As String
        Dim Se3() As String

        Se2 = Split(Source, "src=" & Chr(34))
        Se3 = Split(Se2(1), Chr(34))

        ListBox1.Items.Add(Se3(0))
    End Sub
End Class
Er Speichert dann das erste Bild in der ListBox

Ist nich sehr sauber programmiert

€dit: Kannst mir ja deine MSN oder ICQ adresse schicken per PN

€dit2: Neuer Code der alle bilder findet.

Code:
Public Class Form1

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        WebBrowser1.Navigate("http://images.google.ch/images?q=bilder&oe=utf-8&rls=org.mozilla:de:official&client=firefox-a&um=1&ie=UTF-8&sa=N&hl=de&tab=wi")
    End Sub

    Private Sub WebBrowser1_Navigated(ByVal sender As Object, ByVal e As System.Windows.Forms.WebBrowserNavigatedEventArgs) Handles WebBrowser1.Navigated
        Dim Source
        Source = WebBrowser1.Document.Body.InnerHtml

        Source = Replace(Source, Chr(134), "'")
        Dim Se2() As String
        Se2 = Split(Source, "src=" & Chr(34))
        Dim i As Integer = 0
        Do

            Dim Se3() As String
            Se3 = Split(Se2(i), Chr(34))
            If InStr(LCase(Se3(0)), ".png") Or InStr(LCase(Se3(0)), ".jpg") Or InStr(LCase(Se3(0)), ".jpeg") Then
                ListBox1.Items.Add(Se3(0))
            End If
            i += 1
        Loop Until i = 200

    End Sub
End Class
✝ RiP 
Weiter geht's  Cool
Reply


Messages In This Thread
RE: VB-browser, profis kommt mal her :D - by Milu2K - 27.03.2010, 14:46



Users browsing this thread: 3 Guest(s)