Created
February 25, 2020 14:27
-
-
Save davidsan/8e48cdc63e22ac6896bb40c7f6aec800 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
s = requests.Session() | |
url = 'https://example.com' | |
username = 'alice' | |
password = 'hunter2' | |
r1 = s.get(url+'/login?action=get_auth_params') | |
lt = r1.json() | |
r2 = s.post(url + '/login?lt='+lt['lt']+'&username='+username+'&password='+password) | |
print(r2) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment