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

XMLHttpWebRequest

Discussion in 'C, C++, C#' started by Homer Simpson72, Mar 10, 2016.

  1. Homer Simpson72

    Homer Simpson72 Newbie

    Joined:
    Dec 6, 2015
    Messages:
    23
    Likes Received:
    0
    I am making myself a bot that collects the coins from watching YouTube videos. I am having difficulty logging into the website and the HttpResponse from the code below always returns "Sorry, bro!" when I attempt to login to the website. I do not know a lot about AJAX and XML so any advice would be appreciated. The XML parser function is one I found when I was googling the problem Thank you!

    c#code.jpg
     
  2. 9to5destroyer

    9to5destroyer Jr. VIP Jr. VIP

    Joined:
    Nov 14, 2011
    Messages:
    360
    Likes Received:
    207

    Your missing several fields in the request, example below with dummy data I recommend installing fiddler and comparing your request against browser. Also if your only going to be accessing the site in a single thread it might be easier to use a browser using a library such as selenium
    action=checkLogin&username=me&password=5b722b307fce6c944905d132691d5e4a2214b7fe92b738920eb3fce3a90420a19511c3010a0e7712b054daef5b57bad59ecbd93b3280f210578f547f4aed4d25&id%5Busername%5D=login-username&id%5Bpassword%5D=login-password
     
  3. Homer Simpson72

    Homer Simpson72 Newbie

    Joined:
    Dec 6, 2015
    Messages:
    23
    Likes Received:
    0
    Thanks for the advice. This will definitely finish this bot. I am still learning all of the newer web technologies but I am competent I will learn and one day get a stable job somewhere.