0

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

ZdaR
  • 22,343
  • 7
  • 66
  • 87

1 Answers1

0

I'm afraid it is unlikely that anyone on stackoverflow will try to discern the post parameters for you, however there are a number of ways you can do this.

Community
  • 1
  • 1
Toby Allen
  • 10,997
  • 11
  • 73
  • 124