Answer the question
In order to leave comments, you need to log in
VK-IO captcha processing?
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();
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question