HTTP POST and GET with cookies for authentication in python

后端 未结 5 1127
暖寄归人
暖寄归人 2020-12-05 15:43

I\'m trying to create a python program that logs in to my university\'s site using my id and password. This is the formal page for logging in: https://webapp.pucrs.br/consul

5条回答
  •  情话喂你
    2020-12-05 16:17

    I recommend you to use mechanize, it automatically handles sessions/cookies/logins for you, furthermore it provides a urllib-like API and e.g. form-filling, so you don't have to mess with the right POST-request, since it gets constructed by mechanize.

提交回复
热议问题