Skip to content

Commit

Permalink
Merge pull request #10 from niuware/update-authenticate-method
Browse files Browse the repository at this point in the history
Update authenticate method
  • Loading branch information
niuware authored May 26, 2020
2 parents bd569df + 557c74d commit c7cdca3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion instpector/apis/instagram/authenticate.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import json
from datetime import datetime
from ..http_request import HttpRequest, HttpRequestMode
from ..exceptions import AuthenticateFailException, AuthenticateRevokeException
from .utilities import get_ajax_id, get_consumer_lib_path, get_app_id
Expand Down Expand Up @@ -75,9 +76,10 @@ def _login_prepare(self):
self._app_info['ig_ajax_id'] = ajax_id

def _login_execute(self):
nonce = str(int(datetime.now().timestamp()))
data = {
"username": self._user,
"password": self._password,
"enc_password": '#PWD_INSTAGRAM_BROWSER:0:' + nonce + ':' + self._password,
"queryParams": "{\"source\":\"auth_switcher\"}",
"optIntoOneTap": "true"
}
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setup(
name="instpector",
version="0.2.6",
version="0.2.7",
description="A simple Instagram's web API library",
author="Erik Lopez",
long_description=README,
Expand Down

0 comments on commit c7cdca3

Please sign in to comment.