I use following curl commands to fetch data using cookiejar file:
$ curl -sk -X 'POST' -d "[email protected]&password=mypassword" -c app.cookie-jar -k https://website.com/auth/authenticate
$ curl -sk -X 'GET' -H 'Accept: text/csv' -b app.cookie-jar https://website.com/api/systems > out.csv
Can someone help with python script that can help in achieving the same
Using Requests, set up a session to keep track of the cookie: