npm

@cstleagueorg/cs2-blog-scraper
TypeScript icon, indicating that this package has built-in type declarations

2.2.0 • Public • Published

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;
}

Package Sidebar

Install

npm i @cstleagueorg/cs2-blog-scraper

Weekly Downloads

0

Version

2.2.0

License

ISC

Unpacked Size

10.8 kB

Total Files

6

Last publish

Collaborators

  • polarwooolf