This question has been addresses in various shapes and flavors but I have not been able to apply any of the solutions I read online.
I would like to use Python to log into the site: https://app.ninchanese.com/login and then reach the page: https://app.ninchanese.com/leaderboard/global/1
I have tried various stuff but without success... Using POST method:
import urllib import requests oURL = 'https://app.ninchanese.com/login' oCredentials = dict(email='[email protected]', password='mypassword') oSession = requests.session() oResponse = oSession.post(oURL, data=oCredentials) oResponse2 = oSession.get('https://app.ninchanese.com/leaderboard/global/1') Using the authentication function from requests package
import requests oSession = requests.session() oResponse = oSession.get('https://app.ninchanese.com/login', auth=('[email protected]', 'mypassword')) oResponse2 = oSession.get('https://app.ninchanese.com/leaderboard/global/1') Whenever I print oResponse2, I can see that I'm always on the login page so I am guessing the authentication did not work.
Could you please advise how to achieve this?