handler.ts 719 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. import Emojis from "../../enums/emojis";
  6. const name = `Fast Check ${Emojis.MAGNIFYING_GLASS}`;
  7. export const handler: Handler = new Portal(
  8. name,
  9. config.MASTODON_KEY_FASTCHECK,
  10. {
  11. url: config.FASTCHECK,
  12. articlesSelector: "div.elementor-element-9da95a3 article",
  13. titleSelector: "h1.elementor-post__title, h3.elementor-post__title",
  14. linkSelector: "header h1 a",
  15. scraperMethod: ScraperMethods.AXIOS,
  16. hashtags: ["FastCheck", "Artículo", "Noticias"],
  17. cacheExpiration: 60 * 60 * 24 * 30, // 30 días
  18. }
  19. ).getHandler();