Skip to content

Commit d7e6391

Browse files
committed
4.3
1 parent 746d429 commit d7e6391

3 files changed

Lines changed: 10 additions & 10 deletions

File tree

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33

44
from distutils.core import setup
55
setup(name='vk_api',
6-
version='4.2',
7-
description='Module to use the API VKontakte',
6+
version='4.3',
7+
description='Module to use API VKontakte vk.com',
88
author='Kirill Python',
99
author_email='mikeking568@gmail.com',
1010
url='https://github.com/python273/vk_api',

vk_api/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
__author__ = "Kirill Python"
2-
__version__ = "4.2"
2+
__version__ = "4.3"
33
__email__ = "mikeking568@gmail.com"
44
__contact__ = "https://vk.com/python273"
55

vk_api/vk_api.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88

99
class VkApi():
1010
def __init__(self,
11-
login=None, password=None, auth_in_api=True,
11+
login=None, password=None,
1212
sid=None, token=None,
13-
app_id=2895443, scope=2097151, proxies={}):
13+
app_id=2895443, scope=2097151, proxies=None):
1414

1515
self.login = login
1616
self.password = password
@@ -26,6 +26,7 @@ def __init__(self,
2626
self.http.headers = { # Притворимся браузером
2727
'User-agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:20.0) Gecko/20100101 Firefox/20.0'
2828
}
29+
self.http.verify = False
2930

3031
if login and password: # Oh...
3132
self.sid = self.settings['remixsid']
@@ -34,10 +35,9 @@ def __init__(self,
3435
if not self.check_sid():
3536
if not self.vk_login():
3637
raise authorization_error('Authorization error (bad password)')
37-
if auth_in_api:
38-
if not self.check_token():
39-
if not self.api_login():
40-
raise authorization_error('Authorization error (api)')
38+
if not self.check_token():
39+
if not self.api_login():
40+
raise authorization_error('Authorization error (api)')
4141

4242
def vk_login(self, captcha_sid='', captcha_key=''):
4343
""" Авторизцаия ВКонтакте с получением cookies remixsid """
@@ -135,7 +135,7 @@ def check_token(self):
135135
def method(self, method, data={}):
136136
""" Использование методов API """
137137

138-
url = 'https://api.vk.com/method/%s' % (method)
138+
url = 'https://api.vk.com/method/%s' % method
139139
data.update({'access_token': self.token['access_token']})
140140

141141
response = self.http.post(url, data).json()

0 commit comments

Comments
 (0)