1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

[HELP] Click Cepea lead survey in VB

Discussion in 'Visual Basic .NET' started by dennykropka, Jul 31, 2011.

  1. dennykropka

    dennykropka Newbie

    Joined:
    May 9, 2010
    Messages:
    25
    Likes Received:
    1
    Hey.

    Can anyone help me click survey on page blocked with cepea lead in Visual Basic 2010?

    I tryed almost everything, invokemembers and others.

    Example survey:
    Code:
    <li class="icon_mobile"><a id="survey_0" class="offer_link" onclick="clickSurvey(82349880899, 0); awaitLead('survey', '82349880899'); return false;" bt-xtitle="" title="">Name</a>
    
    
    </li>
    
    EXAMPLE page:
    Code:
    you serials.c om/serial/adobe-photoshop-cs5-extended/189671
     
  2. scraper1

    scraper1 Regular Member

    Joined:
    May 28, 2011
    Messages:
    214
    Likes Received:
    207
    Location:
    Kontiki
    Home Page:
    In C# is very simple:
    Code:
    webBrowser1.document.GetElementById("survey_0").InvokeMember("click");
    in VB should be very similar
     
    • Thanks Thanks x 1
  3. dennykropka

    dennykropka Newbie

    Joined:
    May 9, 2010
    Messages:
    25
    Likes Received:
    1
    It is the same without l at the end but doesn't work:(
    Code:
    Object reference not set to an instance of an object.
    Any other Idea??
     
  4. scraper1

    scraper1 Regular Member

    Joined:
    May 28, 2011
    Messages:
    214
    Likes Received:
    207
    Location:
    Kontiki
    Home Page:
    Show me your code man.
     
  5. dennykropka

    dennykropka Newbie

    Joined:
    May 9, 2010
    Messages:
    25
    Likes Received:
    1
    On first post I post button code and I tryed click with get element by id and scripts like:

    Code:
      Dim links As System.Windows.Forms.HtmlElementCollection
                Dim b As String
                links = WebBrowser1.Document.Links
                For i = 0 To links.Count - 1
                    b = links(i).GetAttribute("href")
                    'check for the right link
                    If b.Contains("atribute") Then
                        WebBrowser1.Navigate(b)
                    End If
                Next
    Or:

       
    Code:
     Dim allelements As HtmlElementCollection = WebBrowser1.Document.All
          For Each webpageelement As HtmlElement In allelements
            If webpageelement.GetAttribute("value") = "atribut" Then
              webpageelement.InvokeMember("click")
            End If
          Next
    Also I tryed with this, but I don't know how to exactly use it :

    Code:
    Public Function GetStringBetween(ByVal InputText As String, _
     ByVal starttext As String, _
     ByVal endtext As String)
    
      Dim lnTextStart As Long
      Dim lnTextEnd As Long
    
      lnTextStart = InStr(StartPosition, InputText, starttext, vbTextCompare) + Len(starttext)
      lnTextEnd = InStr(lnTextStart, InputText, endtext, vbTextCompare)
      If lnTextStart >= (StartPosition + Len(starttext)) And lnTextEnd > lnTextStart Then
        GetStringBetween = Mid$(InputText, lnTextStart, lnTextEnd - lnTextStart)
      Else
        GetStringBetween = "ERROR"
      End If
        End Function

    I tryed too with javascript.
     
    Last edited: Jul 31, 2011
  6. scraper1

    scraper1 Regular Member

    Joined:
    May 28, 2011
    Messages:
    214
    Likes Received:
    207
    Location:
    Kontiki
    Home Page:
    I checked it out and because CPA LEad will create an iframe on that page you will have to make the webBrowser navigate this url instead of the serials dot com link:
    Code:
    http://www.*******.com/mygateway/mygateway_iframe_loader.php?pub=11296&subid=your_ip_here&gateid=MTA4MjM%3D&ref=&cacheurl=aHR0cDovL3d3dy55b3VzZXJpYWxzLmNvbS9zZXJpYWwvYWRvYmUtcGhvdG9zaG9wLWNzNS1leHRlbmRlZC8xODk2NzE%3D
    Replace the stars with cpAAlead domain (seems to be getting deleted) and the parameter for subid with your ip. You will now be able to get the survey_0 htmlelement with the one liner code I mentioned earlier.
     
    • Thanks Thanks x 1
  7. dennykropka

    dennykropka Newbie

    Joined:
    May 9, 2010
    Messages:
    25
    Likes Received:
    1
    Thanx man.

    But the question is can they see I go throu url not webpage... But I will look for iframes click on google.
     
    Last edited: Jul 31, 2011