Skip to content

Commit 9a27147

Browse files
committed
Add VkApi.authorization
1 parent 56a2172 commit 9a27147

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

vk_api/vk_api.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
"""
44
@author: Kirill Python
5-
@contact: http://vk.com/python273
5+
@contact: https://vk.com/python273
66
@license Apache License, Version 2.0, see LICENSE file
77
8-
Copyright (C) 2014
8+
Copyright (C) 2015
99
"""
1010

1111
import jconfig
@@ -83,7 +83,8 @@ def __init__(self, login=None, password=None, number=None, sec_number=None,
8383
CAPTCHA_ERROR_CODE: captcha_handler or self.captcha_handler
8484
}
8585

86-
if login and password:
86+
def authorization(self):
87+
if self.login and self.password:
8788
self.sid = self.settings['remixsid']
8889
self.token = self.settings['access_token']
8990

@@ -471,7 +472,7 @@ def get_url(self):
471472
"""
472473

473474
if not self.url:
474-
self.url = 'http://api.vk.com/captcha.php?sid={}'.format(self.sid)
475+
self.url = 'https://api.vk.com/captcha.php?sid={}'.format(self.sid)
475476

476477
return self.url
477478

0 commit comments

Comments
 (0)