handler.ts 580 B

12345678910111213141516171819202122
  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 = "Cambio21";
  6. export const handler: Handler = new Portal(
  7. name,
  8. config.MASTODON_KEY_CAMBIO21,
  9. {
  10. url: config.CAMBIO21,
  11. articlesSelector: ".news-post.image-post, .news-post.video-post",
  12. titleSelector: "h2 a",
  13. linkSelector: "h2 a",
  14. imageSelector: "img",
  15. scraperMethod: ScraperMethods.AXIOS,
  16. maxArticles: 20,
  17. hashtags: ["Cambio21", "Noticias"]
  18. }
  19. ).getHandler();