|
From: Ryan K. <rya...@gm...> - 2009-10-26 22:17:09
|
This isn't really a developer question, but I don't see a user list.
I have used libgmail in the past successfully, but today I can't seem
to log into my account:
In [11]: ga = libgmail.GmailAccount('rya...@gm...','mypassword')
In [12]: ga.login()
produces
---------------------------------------------------------------------------
GmailLoginFailure Traceback (most recent call last)
/home/ryan/<ipython console> in <module>()
/usr/lib/python2.6/dist-packages/libgmail.py in login(self)
318
319 except AttributeError:
--> 320 raise GmailLoginFailure("Login failed. (Wrong
username/password?)")
321 # We aren't concerned with the actual content of this page,
322 # just the cookie that is returned with it.
GmailLoginFailure: 'Login failed. (Wrong username/password?)'
I went into libgmail.py and printed out pageData from line 313 or so
and here is what I got:
<html><head><title>Google Accounts</title>
<script type="text/javascript">
function getIframeSize() {
if (document.getElementById){
var t = document.getElementById("t");
try {
parent.wh(t.offsetWidth, t.offsetHeight);
} catch (e) {
}
}
}
function setFocus() {
if (document.forms[0].Email.value == null ||
document.forms[0].Email.value == "") {
try {
document.forms[0].Email.focus();
} catch (e) {
}
} else {
try {
document.forms[0].Passwd.focus();
} catch (e) {
}
}
}
</script>
<script type="text/javascript">
function onlogin() {
return;
}
</script>
<style type="text/css">
body, td, th { font-family: Arial, sans-serif;}
div.errormsg { color: red; font-size: smaller; font-family:
arial,sans-serif; }
font.errormsg { color: red; font-size: smaller; font-family:
arial,sans-serif; }
</style>
<style type="text/css">
.gaia.le.lbl { font-family: Arial, Helvetica, sans-serif; font-size: smaller; }
.gaia.le.fpwd { font-family: Arial, Helvetica, sans-serif; font-size: 70%; }
.gaia.le.chusr { font-family: Arial, Helvetica, sans-serif; font-size: 70%; }
.gaia.le.val { font-family: Arial, Helvetica, sans-serif; font-size: smaller; }
.gaia.le.button { font-family: Arial, Helvetica, sans-serif;
font-size: smaller; }
.gaia.le.rem { font-family: Arial, Helvetica, sans-serif; font-size: smaller; }
.gaia.captchahtml.desc { font-family: arial, sans-serif; font-size:
smaller; }
.gaia.captchahtml.cmt { font-family: arial, sans-serif; font-size:
smaller; font-style: italic; }
</style></head>
<body style="background:#efefef" onload="getIframeSize(); setFocus()"
dir="ltr"><!-- ServiceLoginBox.nui=default -->
<div class="body"><form action="ServiceLoginBoxAuth" method="post"
onsubmit="return(onPreLogin());"><table id="t" align="center"
border="0" cellpadding="1" cellspacing="0">
<script type="text/javascript">
function onPreCreateAccount() {
return true;
}
function onPreLogin() {
if (window["onlogin"] != null) {
return onlogin();
} else {
return true;
}
}
</script>
<tr><td colspan="2" align="center"><div class="errorbox-good"></div></td></tr>
<tr><td nowrap><div align="right"><span class="gaia le
lbl">Email:</span></div></td>
<td> <input type="hidden" name="continue"
value="https://mail.google.com/mail/?ui=1&">
<input type="hidden" name="GALX" value="4EKGDT4RGjY">
<input type="text" name="Email" value="" class="gaia le val" size="18"
id="Email"></td></tr>
<tr><td></td>
<td align="left"></td></tr>
<tr><td align="right"><span class="gaia le lbl">Password:</span></td>
<td><input type="password" name="Passwd" class="gaia le val"
id="Passwd" size="18"></td></tr>
<tr><td></td>
<td align="left"></td></tr>
<tr><td align="right" valign="top"><input type="checkbox"
name="PersistentCookie" checked value="yes">
<input type="hidden" name="rmShown" value="1"></td>
<td><span class="gaia le rem">Stay signed in</span></td></tr>
<!-- LoginElementsSubmitButton.nui=default -->
<tr><td></td>
<td align="left"><input type="submit" value="Sign in" class="gaia le
button"></td></tr>
<tr id="ga-fprow"><td colspan="2" nowrap height="33.0" class="gaia le
fpwd" align="center" valign="bottom"><a
href="http://www.google.com/support/accounts/bin/answer.py?answer=48598&hl=en&ctx=ch_ServiceLoginBoxAuth&fpUrl=https%3A%2F%2Fwww.google.com%2Faccounts%2FForgotPasswd%3FfpOnly%3D1%26continue%3Dhttps%253A%252F%252Fmail.google.com%252Fmail%252F%253Fui%253D1%2526%26dEM%3Dryanwkrauss%2540gmail.com"
target="_top">Can't access your account?</a></td></tr>
</table></form></div></body></html>
I can log into my account through the gmail web interface without a
problem. What am I doing wrong?
Thanks,
Ryan
|