diff --git a/gpapi/googleplay.py b/gpapi/googleplay.py index f161448..d5e992d 100644 --- a/gpapi/googleplay.py +++ b/gpapi/googleplay.py @@ -8,6 +8,7 @@ from Crypto.Cipher import PKCS1_OAEP from clint.textui import progress import requests +import sys import base64 import itertools @@ -176,6 +177,11 @@ class GooglePlayAPI(object): if "auth" in params: ac2dmToken = params["auth"] elif "error" in params: + if "NeedsBrowser" in params["error"]: + print("\nsecurity check is needed, try to visit\n" + "https://accounts.google.com/b/0/DisplayUnlockCaptcha\n" + "if you use 2FA it is recommended to setup an app specific password\n") + sys.exit(1) raise LoginError("server says: " + params["error"]) else: raise LoginError("Auth token not found.")