munkireport_parser.py
def authenticate(session, base_url, login, password):
    """Authenticate and get a session cookie"""
    auth_url = "{0}/auth/login".format(base_url)
    auth_data = {"login": login, "password": password}
    auth_request = session.post(auth_url, data=auth_data)
    if auth_request.status_code != 200:
        print("Invalid url!")
        raise SystemExit
Authenticate and get a session cookie
Authenticate and get a session cookie
Authenticate and get a session cookie
def authenticate(session, base_url, login, password):
    auth_url = "{0}/auth/login".format(base_url)
    auth_data = {"login": login, "password": password}
    auth_request = session.post(auth_url, data=auth_data)
    if auth_request.status_code != 200:
        print("Invalid url!")
        raise SystemExit
def authenticate ( session , base_url , login , password ) : auth_url = "{0}/auth/login" . format ( base_url ) auth_data = { "login" : login , "password" : password } auth_request = session . post ( auth_url , data = auth_data ) if auth_request . status_code != 200 : print ( "Invalid url!" ) raise SystemExit
Authenticate and get a session cookie
Authenticate and get a session cookie
"""Authenticate and get a session cookie"""
session
base_url
login
password