diff --git a/fb_auth_token.py b/fb_auth_token.py index ed2fcdf..fcede72 100644 --- a/fb_auth_token.py +++ b/fb_auth_token.py @@ -22,6 +22,10 @@ def get_fb_access_token(email, password): access_token = re.search( r"access_token=([\w\d]+)", s.response.content.decode()).groups()[0] return access_token + except requests.exceptions.InvalidSchema as browserAddress: + access_token = re.search( + r"access_token=([\w\d]+)",str(browserAddress)).groups()[0] + return access_token except Exception as ex: print("access token could not be retrieved. Check your username and password.") print("Official error: %s" % ex)