Neopets login with Python Requests module
<p>I am trying to login to this website with the following code:</p>

<pre><code>import requests

def ReadNeopets(): 
    username = 'notarealone'
    LoginUrl = 'http://www.neopets.com/login/'
    with requests.Session() as s:
        s.get(LoginUrl)
        payload = {'destination': '', 'username': username, 'password': 'notrealeither'}
        print('Logging in to the site.')
        r = s.post(LoginUrl, data=payload)
        print(r.content)
        r = s.get('http://neopets.com/bank.phtml')
        Text = r.content.decode()
        print(r.cookies)
        if username in Text:
            print("Logged into my bank")
        elif bytes("Sign up") in Text:
            print("Failed to log in.")
   return;


def main():
    ReadNeopets()

if __name__ == "__main__":
    main()
</code></pre>

<p>Unfortunately it seems that the post does not work and when checking for the presence of the username it fails as the login was not successful or not attempted? </p>

<p>I am not certain what is happening here and would like to understand better as I am trying to move away from urllib and urllib2.</p>

<p>I added the cookie print and the text print to help try and understand if there were any errors I could try to comprehend but unfortunately not. </p>