vk api function

1
2
3
4
5
6
def vk(method, data):
data.update({'access_token': '1488'})
req = urllib2.Request('https://api.vk.com/method/' + method, urllib.urlencode(data))
res = urllib2.urlopen(req)
res = ast.literal_eval(res.read())
return res