Skip to content Skip to sidebar Skip to footer

Python Urllib Simple Login Script

I am trying to make a script to login into my 'check card balance' service for my university using python. Basically it's a web form where we fill-in our PIN and PASS and it shows

Solution 1:

I tried this (seems working, at least no exception):

from urllib import urlopen, urlencode
myId = '<your_id_here>'
myPin = '<your_pin_here>'
data = {
            'id':myId,
            'PIN':myPin,
            'submit':'Request Access',
            'wcuirs_uri':'https://cf.wcu.edu/busafrs/catcard/idsearch.cfm'
        }

url = 'https://itapp.wcu.edu/BanAuthRedirector/Default.aspx'
response = urlopen(url, urlencode(data))
open("mycatpage.txt",'w').write(response.read())

Post a Comment for "Python Urllib Simple Login Script"