handler.ts 632 B

1234567891011121314151617181920
  1. import { type Handler } from "aws-lambda";
  2. import config from "../../config";
  3. import Portal from "../portal";
  4. import ScraperMethods from "../../enums/scraper-methods";
  5. const name = "EMOL - El Mercurio Online";
  6. export const handler: Handler = new Portal(
  7. name,
  8. config.MASTODON_KEY_EMOL,
  9. {
  10. url: config.EMOL,
  11. articlesSelector: "div.cont_736_e_2015 cont_300_e_2015 div.contenedor-destacados, div.cont_736_e_2015 div",
  12. titleSelector: "h1, h3, div.contenedor-titulo a",
  13. linkSelector: "h1 a, h3 a, div.contenedor-titulo a",
  14. linkPrefix: config.EMOL,
  15. scraperMethod: ScraperMethods.AXIOS
  16. }
  17. ).getHandler();