Romani Bot, v1.0
Posted on

Multifunctional Instagram* bot.
Major release.
* Запрещена в России / Banned in Russia.
Features
- log in a bot account;
- getting of a follower list of a target account;
- for each follower of the target account:
- follow his account;
- getting of his feed;
- for each media in his feed:
- like this media (optionally);
- comment this media (optionally);
- comments:
- generation of a random comment (from predefined parts; see below for details);
- protection against a double commenting (via a memorizing of comments in MongoDB).
Comment Generation
Comment is created from predefined parts. Each part may be a string, a list of strings or an associative array of same parts.
In the first case this string will be selected always.
In the second case a random string from this list will be selected.
In the third case this array may contain few of follow keys: PHOTO, VIDEO, ALBUM and ANY. On a generation for each such array a key corresponded to a commented media type will be selected. If a corresponded key is missed, ANY key will be selected. If ANY key is missed too, this part will be empty. Values of these keys will be processed as well as any part.
Example of a config with comment parts:
<?php return [
'This',
[
'PHOTO' => 'photo',
'ANY' => ['post', 'stuff'],
],
'is',
['cool', 'fantastic', 'awesome'],
'!',
];