0
This is devs, I’m all day trying to implement a way to login to a site with Javascript, it’s my university website, and I’d like to monitor when new notes are released, so I don’t have to go to this site to see if my grades have been released or not, Besides, the site hurts my ugly eyes. I’ve tried several ways I found the 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 haven’t even tried to log in.
Very grateful if anyone can help me
Depending on the site implementation, most create a session token and save somewhere that must be passed on the next restricted access pages to those who are logged in so that the content can be displayed.
– MarceloBoni
@Marceloboni This site really does it, however it is not returning me the token or anything like it, it is simply redirecting me to the login screen
– Emanoel Vieira
Uses the Puppeteer
– Valdeir Psr