diff --git a/app.js b/app.js index b8b73b7..d514fde 100644 --- a/app.js +++ b/app.js @@ -95,7 +95,7 @@ async function login(req, res, next) { const [email, password] = decoded.split(":"); if (email && password) { try { - await paco.secretariaVirtual(email, password, false) + await paco.secretariaVirtual(email, password) .then(async page => { if (page) { req.page = page; diff --git a/scrapers.js b/scrapers.js index 2e0106f..f41fe87 100644 --- a/scrapers.js +++ b/scrapers.js @@ -16,8 +16,8 @@ module.exports = { delete result["size"]; response.status(200).json(success(result)); }) - .catch(err => response.status(500).json(error(err))); - //.finally(() => secretariaVirtual.browser().close()); // close browser when everything is done + .catch(err => response.status(500).json(error(err))) + .finally(() => secretariaVirtual.browser().close()); // close browser when everything is done }, // Secretaria Virtual (login)