handler.ts 674 B

123456789101112131415161718192021
  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_378_e_2015 div.col_center_noticia2-390px, div.cont_378_e_2015 div.col_center_noticia4dest-360px",
  12. titleSelector: "h1 a, h3 a",
  13. linkSelector: "h1 a, h3 a",
  14. linkPrefix: config.EMOL,
  15. scraperMethod: ScraperMethods.AXIOS,
  16. hashtags: ["Emol", "ElMercurioOnline", "ElMercurio", "Noticias"]
  17. }
  18. ).getHandler();