0

i'm trying to click a log in button with requests library, is the first time that i use this library. my code is:

import requests


def login(credentials):
    response = requests.post("https://www.kickz.com/en/checkout/login_offer", data=credentials)

if response.ok:
    print('success')
else:
    raise Exeption ('error', response.status_code)

if __name__ == '__main__':
    credentials = {"E-Mail Address" : "help@me.com", "Password" : "please"}
    login(credentials)`

the code print 'success' but i have no idea how to click the log in button the html code of the button is:

<button type="submit" class="btn btn-block btn-green btn-lg"><span>Log in</span></button>
<span>Log in</span>
</button>

i've done it with Selenium, but i would like to know if it's possibile done it with requests

thank you for dedicating your time to help me.

1 Answers1

0

i suggest you to capture the curl request via the "inspect element" tool then convert it into python code with this tool https://curl.trillworks.com/