handler.ts 848 B

1234567891011121314151617181920212223
  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 = "Chile Cultura";
  6. export const handler: Handler = new Portal(
  7. name,
  8. config.MASTODON_KEY_CHILECULTURA,
  9. {
  10. url: config.CHILECULTURA,
  11. articlesSelector: "section.section-base-subsection#this_week_events .card-event, section.section-base-subsection#next_week_events .card-event",
  12. titleSelector: "div.card-body a",
  13. linkSelector: "div.card-body a",
  14. contentSelector: "p.card-discipline, p.card-description-icon",
  15. linkPrefix: "https://chilecultura.gob.cl",
  16. scraperMethod: ScraperMethods.AXIOS,
  17. cacheExpiration: 60 * 60 * 24 * 7, // 7 días
  18. hashtags: ["ChileCultura", "Cartelera", "Panoramas", "Cultura", "Chile"]
  19. }
  20. ).getHandler();