How to login with python and save cookie, then use that info to view page for member only
<p>I am quite new in python and trying to write a script to login to the page at <a href="http://ryushare.com/login.python" rel="nofollow">http://ryushare.com/login.python</a>.</p>

<p>I have try many attempt, but it fails to login and i have no idea why.
After login to the page, I wish to get the return of <a href="http://ryushare.com/file-manager.python" rel="nofollow">http://ryushare.com/file-manager.python</a></p>

<p>Here's the code I try to attempt by reading the example from others.</p>

<pre><code>import urllib, urllib2, cookielib
username = 'myusername'
password = 'mypassword'

cj = cookielib.CookieJar()
opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cj))
login_data = urllib.urlencode({'login' : username, 'password' : password})
opener.open('http://www.ryushare.com/login.python', login_data)
resp = opener.open('http://ryushare.com/file-manager.python')
print resp.read()
</code></pre>

<p>I check the source code of the login page, it said the username and password value is "login and password" so i change it.
I have try some other example which can be found here like google news feed, It also can not able to login : (</p>
