From 9bc92debc49179ca2cbc1cbeeea83d8de18a2710 Mon Sep 17 00:00:00 2001 From: Erik Lopez Date: Tue, 26 May 2020 12:05:29 +0900 Subject: [PATCH 1/2] Update login method --- instpector/apis/instagram/authenticate.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/instpector/apis/instagram/authenticate.py b/instpector/apis/instagram/authenticate.py index 98b4b18..f2d5122 100644 --- a/instpector/apis/instagram/authenticate.py +++ b/instpector/apis/instagram/authenticate.py @@ -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 @@ -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" } From 557c74dfff503e98be6183c74350079521e86638 Mon Sep 17 00:00:00 2001 From: Erik Lopez Date: Tue, 26 May 2020 12:05:58 +0900 Subject: [PATCH 2/2] Update package version --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 2a768cf..cd841b9 100644 --- a/setup.py +++ b/setup.py @@ -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,