mateossh / wwsi-rss

Scrape schools' website and generate better RSS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

WWSI RSS

screenshot

Scrape schools' website and generate better RSS.

πŸ€” How it works?

Application is using credentials from environment variables to login and then session cookie is stored in Redis server. When someone fetches /rss.xml, application uses stored cookie to scrape official website and generate new RSS.

πŸš€ Project Structure

Inside of your Astro project, you'll see the following folders and files:

/
β”œβ”€β”€ public/
β”‚   └── favicon.svg
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ layouts/
β”‚   β”‚   └── Layout.astro
β”‚   └── pages/
β”‚       └── api/
β”‚           └── login.ts     <- handles getting session
β”‚           └── news.ts      <- scrapes website
β”‚       └── index.astro
β”‚       └── rss.xml.ts       <- generates rss based on data from /api/news
└── package.json

🧞 Commands

All commands are run from the root of the project, from a terminal:

Command Action
bun install Installs dependencies
bun dev Starts local dev server at localhost:4321
bunx astro ... Run CLI commands like astro add, astro check
bunx astro --help Get help using the Astro CLI
bun prettier:check Checks code formatting
bun prettier:fix Fix code formatting

πŸ› Known issues

  1. 'Missing required environment variables KV_REST_API_URL and KV_REST_API_TOKEN'

Solution: rename file with envvars to .env.local

About

Scrape schools' website and generate better RSS


Languages

Language:TypeScript 44.6%Language:XSLT 29.5%Language:Astro 19.9%Language:JavaScript 6.0%