I am stuck to this problem from last 2 weeks , I have tried everything available to me , Actually I want to login this page : https://accounts.coursera.org/signin , using request module but I am not able to figure out the exact parameters to be passed to the .post() method, It would really be very appreciable if one could find time to look on to this webpage and suggest me the required edits, Here is my code :
import requests
LOGIN_URL = 'https://accounts.coursera.org/signin'
DATA_URL = 'https://www.coursera.org/'
payload = {
"email": 'sdasds@dassd.com',
"password": 'wdads54s12',
"webrequest" : 'true'
}
with requests.Session() as s:
a = s.post(LOGIN_URL, data=payload,headers = {'Referer':'https://accounts.coursera.org/signin?post_redirect=https%3A%2F%2Fwww.coursera.org%2F',
'Connection':"keep-alive"})
print a.status_code,"<---s"
>>> 404
It may be time consuming for you but I need sincere help in figuring this out , I am stuck at the very first step of my open source project