import requests
URL = 'https://www.yourlibrary.ca/account/index.cfm'
payload = {'barcode': 'your user name/login', 'telephone_primary':
    'your password', 'persistent': '1'}
session = requests.session()
r = requests.post(URL, data=payload)
print(r.cookies)
How to simulate HTTP post request using Python Requests module?