Y
Y
Yoshinon Eared2017-02-05 12:39:09
Python
Yoshinon Eared, 2017-02-05 12:39:09

Python - is it rational to use for bot writing?

Good day, dear participants of this resource!
There is a task - to write a bot for one online game. In fact, it's already been written, but it's done in PHP + AutoIt .
The online game is extremely simple (it accepts regular POST and GET requests), so there are no difficulties with this part - transferring this to python is a trifling matter, given how much the requests module simplifies this matter (compared to curl - heaven and earth ).
The question is different.
The fact is that the number of accounts can be more than one. And at the moment, all the functions that do something, they break through these accounts sequentially, i.e. one after the other - this is very pale, because the same accounts receive the same amounts at the same time and are in the same group (almost any online game supports the creation of cooperatives, this leads to even more pale ).
Now closer to the heart of the matter.
How realistic is it to add the ability to delay the launch of a function using python?
For example. I want the function A('Account_1') to be called three times, at such and such a time.
At the same time, function A('Account_2') must make four calls, at some time,different from the function above.
There may also be a function B(...) , which should also do something for each of the accounts, independently of each other and from the functions A(...) .
The very first option that comes to my mind is to use a py script with a bot algorithm for each individual account (i.e. create a bunch of py scripts, each of which will be used only for one account), but when there are a lot of accounts and the function is not one - this is an extremely bad strategy.
How to be? threading , asyncio , tornado ? What will allow you to realize the idea at minimal cost?
Or maybe IronPython should be used? True, then the whole point is lost, as well as the possibilities of requests - I could use C # directly with the same success.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
X
xozzslip, 2017-02-05
@Aquinary

Look in the direction of celery (python library), namely the periodic tasks module

1
1011, 2017-02-05
@1011

the same accounts receive the same amounts at the same time and are in the same group

By IP, they can still determine that the owner of the bots is one person-). It is easier then to make one program that comes in sequentially under different accounts, through different proxy servers.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question