views:

145

answers:

2

Hi all, is there an existing platform/framework for developing Web/HTTP based robots? Actually I'm interested in playing some web games, in which one can build his city, select and training his hero and soldier, and so on.. (such as Travian ) but in the game, such actions need time to complete (I hate waiting..) I try to write a automatic tool to deal with them. So I try to find a platform/framework that can ease the develop progress by:

  • provide a http/https client( it's better to support Keep-Alive )
  • make it easy to parse a web page, josn data [IMPORTANT]
  • support job/task schedule
  • enable scripts such as javascript, python..
  • event driven( I think it's the best way for such platform/framework)

I did a research and found Twisted seems to be the most suitable one, but still want to know if there's another one which is most suitable.

Yes I know and familiar with those QA tools, but I really like a console app working on HTTP level, scripts will tell it how to deal with the game events, thus it can be called a Robot... So I need a framework...

A: 

You're way off, Twisted is definitely NOT what you're after. If the game you're trying to script is a purely (X)HTML based game then you may use something like Watir/WatiN/scrubyt and so on in order to simulate browser actions. If it's a flash game your best bet is reversing the swift, parse and elaborate the data as you need.

emaster70
A: 

Might want to check out AutoHotKey, its a lot simpler then what you describe but is very easy to write macro scripts that utilize the mouse. Also it is not synthetic I/O events which means you can get around most of the security measures those type of games have.

Probably you should look into using Dojo which is a Javascript framework. There is a robot that responds to mouse and key events under the DOH test framework. Its kind of hard to use at first, but it seems pretty powerful. Instead of writing "tests" you could instead just write certain actions, like "build house" or whatever, and then just write one main js script that decides what to do.

lampShaded