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

When programming web automation bots how do you monitor how it works?

Discussion in 'General Programming Chat' started by MyspaceisstillCool, Aug 20, 2015.

  1. MyspaceisstillCool

    MyspaceisstillCool BANNED BANNED

    Joined:
    Feb 16, 2015
    Messages:
    304
    Likes Received:
    36
    Ive just started the code academy courses for python now thinking that if I learn it slowly Ill slowly replace my zennoposter bots as I get better.

    I wonder tho since you dont have the graphical interface how do you track what to do where like with clicks and so forth if you only have lines of code to work with? Interested how it works when only using a programming language rather than directly manipulating the browser based stuff via recording etc in zenno.

    Isnt it alot more difficult cos everything will be several steps removed?
     
  2. Cloakd

    Cloakd Newbie

    Joined:
    Jun 17, 2014
    Messages:
    5
    Likes Received:
    1
    use the status code of the return to judge if the click was successful. If you monitor the traffic you can capture this relatively easily. i.e 200 means success whereas 404,500,505 means failure
     
  3. webblackart

    webblackart Registered Member

    Joined:
    May 13, 2009
    Messages:
    60
    Likes Received:
    10
    When i am writing bots for webpages i normaly first check the traffic with a browser plugin like httpFox to see the request and response pairs. Then i try to write the same sequence as socket writes and reads.
     
  4. Groen

    Groen Regular Member

    Joined:
    Nov 7, 2009
    Messages:
    397
    Likes Received:
    222
    First you run something that captures the HTTP(S) traffic and then you do whatever you want your bot to do in your browser. Look at the request you sent and the response you got, replicate this in your application, and repeat until you're done. But first off you should familiarize yourself with the HTTP protocol, it'll allow you to understand what you're actually doing, from the very start.

    I'll recommend using Fiddler, it only captures HTTP(S) traffic and it's very easy to filter exchanges, plus you get a lot of different editing options. It also allows me to quickly debug applications, as I can capture all HTTP exchanges made through a single application, like a Java application.