Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var interval = setInterval(function() {
- tokens.forEach(function(token) {
- var msg = messages[Math.floor(Math.random()*messages.length)]
- request({
- headers: {'User-Agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 11_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/11.0 Mobile/15E148 Safari/604.1'},
- url: `https://api.vk.com/method/wall.createComment?owner_id=${user_id}&post_id=${post_id}&from_group=1&message=${msg}&v=5.95&access_token=${token}`,
- method: 'GET'
- }, function (err, res, body) {
- if(body != "" && body != null) {
- if(body.includes("response")) {
- count++;
- console.log(`— Оставлен комментарий №${count}: ${msg}`);
- } else if(body.includes("captcha")) {
- console.log(`— Требуется капча`);
- } else {
- console.log(body);
- }
- }
- });
- });
- }, intervala);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement