Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import vk_api
- import time
- import random
- vk = vk_api.VkApi(login = 'хз', password = 'хз')
- vk.auth()
- comms = ['ххх', 'новый бох', 'шарлотка', 'cot', 'tt', 'loxxx','пацаны я первый','лучший','яра','хопа епта']
- def comm(owner_id, post_id,
- c,from_group):
- vk.method('wall.createComment', {'owner_id':owner_id,'post_id':post_id, 'message':c,'from_group':1})
- while True:
- try:
- newsfeed = vk.method("newsfeed.get", {"count": 1})
- rcomm = random.choice(comms)
- if newsfeed['items'][0]['comments']['can_post'] == 1 and newsfeed['items'][0]['comments']['count'] == 0:
- comm(newsfeed['items'][0]['source_id'], newsfeed['items'][0]['post_id'], rcomm,1)
Add Comment
Please, Sign In to add comment