Simulate Login to a website
Speaks devs, I am all day trying to implement a way to log in to a site with JavaScript, it is the site of my university, and I would like to monitor when new notes are released, so I do not have to enter this site to check if my notes were released or not, in addition the site hurts my ugly eyes. I've tried several ways that I found internet out, the last one I tried was something like this:
axios.post('https://sigaa.uepa.br/sigaa/logar.do?dispatch=logOn', {
"user.login": 'myLogin',
"user.senha": 'myPsw'
}, {headers: {'Accept': 'application/json'}})
.then(function (res) {
//Função que vai tratar o html e extrair as notas
extractNotes(res)
})
.catch(function (error) {
console.error(error);
});
I think this code can explain more clearly what I want, however it is not logging in and is returning me the login page back, as if I had not even tried to log in.
Very grateful if anyone can help me
0
Author: Emanoel Vieira, 2019-08-16