const { VK } = require('vk-io')
const vk = new VK({
token: 'token'
});
async function run() {
const response = await vk.api.groups.get({
owner_id: urid
});
vk.captchaHandler = async ({ src, type }, retry)=> {
let key = await _.rl.questionAsync("Enter captcha ["+src+"]: ");
try {
await retry(key);
console.log('Success');
} catch (e) { console.error(e); }
};
let i = 0;
while (i < 1000) {
try {
console.log(response.items[i])
await vk.api.wall.post({
owner_id: response.items[i],
message: '!help',
})
}
catch (error) {
console.error('Error get user data. API Error:\n\t', error.message);
}
i++;
}
}
run().catch();
Error get user data. API Error:
Code №9 - Flood control: too much captcha requests
Не работает обработка капчи :(