Loggin Through Website W/ Python

634
0
01-04-2013 11:03 AM
RJCole
by
New Contributor
I've created this script that logs in to Windows Live (http://login.live.com/) but I can't tell if it works, can anyone elaborate?
import requests
import sys

EMAIL = 'email goes here'
PASSWORD = 'pass goes here'

URL = 'https://login.live.com/'

def main():
    # Start a session so we can have persistant cookies
    session = requests.Session()

    # This is the form data that the page sends when logging in
    login_data = {
        'login': EMAIL,
        'passwd': PASSWORD,
        'submit': 'login',
    }

    session.post( URL, data = login_data )

Tags (2)
0 Kudos
0 Replies