Skip to content

Commit

Permalink
Small fix in api_login
Browse files Browse the repository at this point in the history
  • Loading branch information
python273 committed Feb 3, 2017
1 parent 21dfd04 commit e1e0675
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions vk_api/vk_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,11 +291,13 @@ def api_login(self):
self.http.cookies.update(self.settings.forapilogin)
self.http.cookies.update({'remixsid': self.sid})

response = self.http.post(url, values)
response = self.http.get(url, params=values)

if 'access_token' not in response.url:
url = search_re(RE_TOKEN_URL, response.text)
response = self.http.get(url)

if url:
response = self.http.get(url)

if 'access_token' in response.url:
params = response.url.split('#')[1].split('&')
Expand Down

0 comments on commit e1e0675

Please sign in to comment.