Note that there are some explanatory texts on larger screens.

plurals
  1. POUsing CookieJar in Python to log in to a website from "Google App Engine". What's wrong here?
    primarykey
    data
    text
    <p>I've been trying to find a python code that would log in to my mail box on yahoo.com from <a href="http://code.google.com/intl/en/appengine/docs/whatisgoogleappengine.html" rel="nofollow noreferrer">"Google App Engine"</a> . <a href="https://stackoverflow.com/questions/1914275/googles-app-engine-python-how-to-get-parameters-from-a-log-in-pages">Here (click here to see that page)</a> I was given this code:</p> <pre><code>import urllib, urllib2, cookielib url = "https://login.yahoo.com/config/login?" form_data = {'login' : 'my-login-here', 'passwd' : 'my-password-here'} jar = cookielib.CookieJar() opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(jar)) form_data = urllib.urlencode(form_data) # data returned from this pages contains redirection resp = opener.open(url, form_data) # yahoo redirects to http://my.yahoo.com, so lets go there instead resp = opener.open('http://mail.yahoo.com') print resp.read() </code></pre> <p>The author of this script looked into HTML script of <a href="https://login.yahoo.com/config/login_verify2?&amp;.src=ym" rel="nofollow noreferrer">yahoo log-in form</a> and came up with this script. </p> <p>That log-in form contains two fields, one for users' Yahoo! ID and another one is for users' password. Here is how HTML code of that page for both of those fields looks like:</p> <p>User ID field:</p> <pre><code>&lt;input type="text" maxlength="96" class="yreg_ipt" size="17" value="" id="username" name="login"&gt; </code></pre> <p>Password field:</p> <pre><code>&lt;input type="password" maxlength="64" class="yreg_ipt" size="17" value="" id="passwd" name="passwd"&gt; </code></pre> <p>However, when I uploaded this code to Google App Engine I discovered that this log-in form keeps coming back to me, which, I assume, means that logging-in process didn't succeed. Why is it so?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload