authenticate properly in alternative tokens

This commit is contained in:
Manuel Cortez 2018-12-17 17:01:37 -06:00
parent 49c96963f8
commit 9296ef5333

View File

@ -25,7 +25,7 @@ class vkObject(object):
self.session_object = vk_api.VkApi(app_id=self.api_key, login=user, password=password, token=token, scope="offline, wall, notify, friends, photos, audio, video, docs, notes, pages, status, groups, messages, notifications, stats", config_filename=filename) self.session_object = vk_api.VkApi(app_id=self.api_key, login=user, password=password, token=token, scope="offline, wall, notify, friends, photos, audio, video, docs, notes, pages, status, groups, messages, notifications, stats", config_filename=filename)
else: else:
self.session_object = vk_api.VkApi(app_id=self.api_key, login=user, password=password, scope="offline, wall, notify, friends, photos, audio, video, docs, notes, pages, status, groups, messages, notifications, stats", config_filename=filename) self.session_object = vk_api.VkApi(app_id=self.api_key, login=user, password=password, scope="offline, wall, notify, friends, photos, audio, video, docs, notes, pages, status, groups, messages, notifications, stats", config_filename=filename)
self.session_object.auth(token_only=True) self.session_object.auth()
self.client = self.session_object.get_api() self.client = self.session_object.get_api()
# print self.client.audio.get() # print self.client.audio.get()
log.debug("Getting tokens for 24 hours...") log.debug("Getting tokens for 24 hours...")