Ejemplo n.º 1
0
#if you want to add some remarks with your order (precise the address
#this kind of stuff)
REMARKS_ABOUT_THE_ORDER = ''

# we first fake we open the login page
html = session.transmit(LOGIN_URL,https = True)

#now we prepare the login post request
postData = {
    'userName' : USERNAME,
    'password' : PASSWORD,
}
loginTreatHTML = session.transmit_post_form(
    post_url = LOGIN_TREAT_URL,
    post_data_array = postData,
    https = True
)
#we are then redirected to the page to make a new order
#we get the redirected page
orderNewURL = session.get_redirection()


#now we arrive on the page to precise the address
#TODO have an option to not chose the default one
#TODO have an option to go on the "add a new address"

orderNewHTML = session.transmit(orderNewURL,https = True)
#the order new form as a csrf inside so we first get its value
#TODO check if the csrf is the same all along the session (it seems so)
csrf = get_csrf(orderNewHTML)