handler.ts 704 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 = `Ladera Sur`;
  6. export const handler: Handler = new Portal(
  7. name,
  8. config.MASTODON_KEY_LADERASUR,
  9. {
  10. url: config.LADERASUR,
  11. articlesSelector: "ul.featured-articles-list li, ul.articles-list li",
  12. titleSelector: "a h3, a h2",
  13. linkSelector: "a",
  14. scraperMethod: ScraperMethods.AXIOS,
  15. hashtags: ["LaderaSur", "Ciencia", "Biodiversidad", "ViajesYDestinos", "MedioAmbiente", "DeporteYOutdoor", "Arte", "Cultura", "Patrimonio"],
  16. cacheExpiration: 60 * 60 * 24 * 30, // 30 días
  17. }
  18. ).getHandler();