Guest User

Untitled

a guest
Aug 18th, 2018
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. import vk_api
  2. import time
  3. import random
  4. vk = vk_api.VkApi(login = 'хз', password = 'хз')
  5. vk.auth()
  6.  
  7. comms = ['ххх', 'новый бох', 'шарлотка', 'cot', 'tt', 'loxxx','пацаны я первый','лучший','яра','хопа епта']
  8.  
  9. def comm(owner_id, post_id,
  10. c,from_group):
  11. vk.method('wall.createComment', {'owner_id':owner_id,'post_id':post_id, 'message':c,'from_group':1})
  12.  
  13. while True:
  14. try:
  15. newsfeed = vk.method("newsfeed.get", {"count": 1})
  16. rcomm = random.choice(comms)
  17.  
  18. if newsfeed['items'][0]['comments']['can_post'] == 1 and newsfeed['items'][0]['comments']['count'] == 0:
  19. comm(newsfeed['items'][0]['source_id'], newsfeed['items'][0]['post_id'], rcomm,1)
Add Comment
Please, Sign In to add comment