Skip to content

Commit 2dc5eb7

Browse files
committed
4.6.2
fix example.py for new api encoding in first line
1 parent ac8b231 commit 2dc5eb7

6 files changed

Lines changed: 13 additions & 5 deletions

File tree

example.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# -*- coding: utf-8 -*-
2+
13
'''
24
@author: Kirill Python
35
@contact: http://vk.com/python273
@@ -6,7 +8,6 @@
68
Copyright (C) 2013
79
'''
810

9-
# -*- coding: utf-8 -*-
1011
import vk_api
1112

1213

@@ -26,7 +27,7 @@ def main():
2627
'count': 1 # Получаем только одно сообщение
2728
}
2829
response = vk.method('wall.get', values) # Используем метод wall.get
29-
print(response[1]['text']) # Печатаем текст последнего поста со стены
30+
print(response['items'][0]['text']) # Печатаем текст последнего поста со стены
3031

3132
if __name__ == '__main__':
3233
main()

jconfig/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# -*- coding: utf-8 -*-
2+
13
'''
24
@author: Kirill Python
35
@contact: http://vk.com/python273

jconfig/jconfig.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# -*- coding: utf-8 -*-
2+
13
'''
24
@author: Kirill Python
35
@contact: http://vk.com/python273
@@ -6,7 +8,6 @@
68
Copyright (C) 2013
79
'''
810

9-
# -*- coding: utf-8 -*-
1011
import os
1112
import json
1213

setup.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# -*- coding: utf-8 -*-
2+
13
'''
24
@author: Kirill Python
35
@contact: http://vk.com/python273

vk_api/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# -*- coding: utf-8 -*-
2+
13
'''
24
@author: Kirill Python
35
@contact: http://vk.com/python273

vk_api/vk_upload.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# -*- coding: utf-8 -*-
2+
13
'''
24
@author: Kirill Python
35
@contact: http://vk.com/python273
@@ -6,8 +8,6 @@
68
Copyright (C) 2013
79
'''
810

9-
# -*- coding: utf-8 -*-
10-
1111

1212
class VkUpload(object):
1313
def __init__(self, vk):

0 commit comments

Comments
 (0)