diff options
| author | Egor Tensin <Egor.Tensin@gmail.com> | 2016-02-12 02:56:55 +0300 |
|---|---|---|
| committer | Egor Tensin <Egor.Tensin@gmail.com> | 2016-02-12 02:56:55 +0300 |
| commit | f9b481e688b6bc5ff8606910e1c0780cc01f05aa (patch) | |
| tree | ee74548ae808a138dd59fcbb961cb7aa5f083641 | |
| parent | bugfix (diff) | |
| download | vk-scripts-f9b481e688b6bc5ff8606910e1c0780cc01f05aa.tar.gz vk-scripts-f9b481e688b6bc5ff8606910e1c0780cc01f05aa.zip | |
request responses in English explicitly
| -rw-r--r-- | api.py | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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) |
