JSPM

@cstleagueorg/cs2-blog-scraper

2.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 44
  • Score
    100M100P100Q57537F
  • License ISC

Package Exports

  • @cstleagueorg/cs2-blog-scraper
  • @cstleagueorg/cs2-blog-scraper/dist/src/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@cstleagueorg/cs2-blog-scraper) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

CS Blog and Updates Scraper

Get Blog and Update posts from CS2

Usage:

import { getBlogPosts, getUpdatePosts } from "@cstleagueorg/cs2-blog-scraper";

const blogPosts = await getBlogPosts();
const updatePosts = await getUpdatePosts();

OR

import getPosts from "@cstleagueorg/cs2-blog-scraper";

const posts = await getPosts();

OR

import { UpdatesListener, Post } from "@cstleagueorg/cs2-blog-scraper";
function receiveUpdate(post: Post) {
  console.log(post)
}
const listener = new UpdatesListener(receiveUpdate); // check updates every 10 minutes
...
listener.stopListening();

Output:

interface Post {
  title: string;
  url: string;
  date: Date;
  image?: string;
  content: string;
}