From 7b305785319ddc7717e71b86ac3e1068d40ce6d6 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 20 Jan 2012 12:12:21 +0530 Subject: [PATCH] ... --- setup/hosting.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/setup/hosting.py b/setup/hosting.py index e5fc3c878d..cdfd333f2a 100644 --- a/setup/hosting.py +++ b/setup/hosting.py @@ -26,7 +26,11 @@ def login_to_google(username, password): br.form['Email'] = username br.form['Passwd'] = password raw = br.submit().read() - if b'Account overview - Account Settings' not in raw: + if re.search(br'.*?Account Settings', raw) is None: + x = re.search(br'(?is).*?', raw) + if x is not None: + print ('Title of post login page: %s'%x.group()) + #open('/tmp/goog.html', 'wb').write(raw) raise ValueError(('Failed to login to google with credentials: %s %s' '\nGoogle sometimes requires verification when logging in from a ' 'new IP address. Use lynx to login and supply the verification, '