From f9b481e688b6bc5ff8606910e1c0780cc01f05aa Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Fri, 12 Feb 2016 02:56:55 +0300 Subject: request responses in English explicitly --- api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api.py b/api.py index 5d11e4f..e7fbb81 100644 --- a/api.py +++ b/api.py @@ -6,7 +6,7 @@ import json, sys, urllib.request def call_method(method_name, **kwargs): get_args = '&'.join(map(lambda k: '{}={}'.format(k, kwargs[k]), kwargs)) - url = 'https://api.vk.com/method/{}?{}'.format(method_name, get_args) + url = 'https://api.vk.com/method/{}?lang=en&{}'.format(method_name, get_args) response = json.loads(urllib.request.urlopen(url).read().decode()) if 'response' not in response: print(response, file=sys.stderr) -- cgit v1.2.3