Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ElektronPlus/zseis-news
🏫 Scrape news from my school site and send them trough Discord!
https://github.com/ElektronPlus/zseis-news
discord discordapp poland school scraper webhook
Last synced: about 2 months ago
JSON representation
🏫 Scrape news from my school site and send them trough Discord!
- Host: GitHub
- URL: https://github.com/ElektronPlus/zseis-news
- Owner: ElektronPlus
- License: mit
- Created: 2021-09-10T12:10:08.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-03-06T10:31:06.000Z (almost 2 years ago)
- Last Synced: 2024-02-12T17:06:44.955Z (11 months ago)
- Topics: discord, discordapp, poland, school, scraper, webhook
- Language: TypeScript
- Homepage: https://zseis.zgora.pl
- Size: 728 KB
- Stars: 4
- Watchers: 0
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
---
- scrape news from [🌐 school site (https://zseis.zgora.pl/)](https://zseis.zgora.pl/)
- send them trought [🐱💻 Discord Webhooks](https://discord.com/developers/docs/resources/webhook)
- doesn't require hosting as it uses [:octocat: GitHub Actions](https://github.com/konhi/zseis-news/actions)# 📐 Technical info
- You can't get id of entry in easy way (to my knowledge other than brute-forcing), so script generates a checksum (`md5(title + dateModified)`) to check what news were already sent to Discord
- Script has hard-coded that there are 4 news per page and will throw error if will find more, this is due to not well structured HTML of website. This also leads to news extracter seem to be a bit unintuitive.
- It uses Discord Webhooks and requires function in other bot to crosspost on announcement channel.# 🔨 Developing
```
git clone https://github.com/konhi/zseis-news.git
cd zseis-news
echo WEBHOOK_URL=" .env
npm install
```- `npm run start`: builds and runs the script
- `npm run test`: code testing using jest
- `npm run lint`: automatically fix problems and show style errors
- `npm run dev`: TypeScript compiler watch for changes
- `node dist/main.js`: run main program (without compiling)