Tooling for scraping and providing publicly available data from FCSE services. The data is provided using a REST API or webhooks. Requires Node.js 26+.
The scrapers are implemented as classes (called strategies) which contain several selectors and methods for fetching the data from each container (post, announcement, etc). Adding a new service requires creating a new strategy and linking it. See the example strategy for more info.
To run the scraper:
- Clone the repository:
git clone https://github.com/finki-hub/services-scraper.git - Prepare configuration by copying
config/config.sample.jsontoconfig/config.json - Install dependencies:
npm i - Run the scraper
npm run start
It's also available as a Docker image:
docker run -d \
--name services-scraper \
--restart unless-stopped \
-v ./cache:/app/cache \
-v ./config:/app/config \
-v ./logs:/app/logs \
ghcr.io/finki-hub/services-scraper:latestOr Docker Compose: docker compose up -d
You can select which scrapers to run declaratively (in the configuration with the enabled flag) or imperatively: npm run start scraper_1 scraper_2 ... scraper_n
- Clone the repository:
git clone https://github.com/finki-hub/services-scraper.git - Install dependencies:
npm i - Prepare configuration:
cp config/config.sample.json config/config.json - Build the project:
npm run build - Run it:
npm run start
There is an example configuration file available at config/config.sample.json. Copy it to config/config.json and edit it to your liking.
PostHog product analytics are wired through environment variables. They are no-ops when POSTHOG_KEY is empty (dev/CI/tests emit nothing). The following events are emitted — all metadata only, no scraped content:
scrape_started— emitted before each scraper iteration starts. Properties:source.scrape_run— emitted after each scraper iteration succeeds or fails. Properties:source,service,items_found,items_new,ms,status.source_scraped— emitted after each source scrape succeeds or fails. Properties:source,records_added,records_total,duration_ms,success.notification_sent— emitted after a Discord notification batch succeeds or fails. Properties:source,count,success.- Exception capture — emitted for handled scraper errors via PostHog exception capture. Properties include
service,context, andscraper; PostHog records the exception message and stack trace only (Node.js does not serialize frame-local variables).
| Variable | Default | Description |
|---|---|---|
POSTHOG_KEY |
empty | PostHog project ingest key (public). |
POSTHOG_HOST |
https://eu.i.posthog.com |
PostHog Cloud EU ingest host. |
Analytics require an explicit POSTHOG_KEY in the environment; without it the scraper runs silently with no telemetry.
This project is licensed under the terms of the MIT license.