Added a time delay for get_users function due to the VK API error

This commit is contained in:
Manuel Cortez 2016-02-14 17:39:56 -06:00
parent 0266100d66
commit 9065040439

View File

@ -1,4 +1,5 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
import time
import arrow import arrow
import languageHandler import languageHandler
import paths import paths
@ -216,6 +217,8 @@ class vkSession(object):
return "no specified community" return "no specified community"
def get_users(self, user_ids=None, group_ids=None): def get_users(self, user_ids=None, group_ids=None):
time.sleep(1)
print len(user_ids.split(","))
if user_ids != None: if user_ids != None:
u = self.vk.client.users.get(user_ids=user_ids, fields="uid, first_name, last_name") u = self.vk.client.users.get(user_ids=user_ids, fields="uid, first_name, last_name")
for i in u: for i in u: