[VB]Webrequest recaptcha klappt nicht

01/16/2014 18:13 Hanteken#1
Wenn ich das mit diesem Code mache bekomme ich 2 verschiedene captchas.
Code:
Dim r As HttpWebRequest = HttpWebRequest.Create("http://freebitco.in/")
        r.CookieContainer = cookiecon
        Dim re As HttpWebResponse = r.GetResponse()
        Dim response As HttpWebResponse = DirectCast(r.GetResponse, HttpWebResponse)
        Using sr As New StreamReader(response.GetResponseStream)
            Dim input As String = sr.ReadToEnd
            Dim apiURL As String = GetStringBetween(input, "src=""http://www.google.com/recaptcha/api/challenge?k=", """")

            Dim r2 As HttpWebRequest = HttpWebRequest.Create("http://www.google.com/recaptcha/api/challenge?k=" & apiURL)
            r2.CookieContainer = cookiecon
            Dim re2 As HttpWebResponse = r2.GetResponse()
            Dim response2 As HttpWebResponse = DirectCast(r2.GetResponse, HttpWebResponse)
            Using sr2 As New StreamReader(response2.GetResponseStream)
                Dim input2 As String = sr2.ReadToEnd
                Dim captchaimg As String = GetStringBetween(input2, "challenge : '", "',")
                Dim captchaurl As String = ("http://www.google.com/recaptcha/api/image?c=" & captchaimg)
                TextBox1.Text = captchaimg
                PictureBox1.Load(captchaurl)
                WebBrowser1.DocumentText = input
                Timer1.Stop()
            End Using
        End Using
    End Sub
01/21/2014 01:12 MrSm!th#2
#moved
01/21/2014 21:59 b0tterk2#3
Warum auch doppelt?:

Code:
  Dim re2 As HttpWebResponse = r2.GetResponse()
            Dim response2 As HttpWebResponse = DirectCast(r2.GetResponse, HttpWebResponse)
01/22/2014 15:16 Hanteken#4
funzt immer noch nicht :I
01/22/2014 15:21 Razor'#5
PM - me! Kann dir helfen.