Skip to content

vikmind/tgn-water

Repository files navigation

Scraper and telegram bot for http://tgnvoda.ru/avarii.php.

Setup your own scraper and channel

You can use this project as a template for your own updates channel. In order to do so, you should

  1. Fork the repo
  2. Create scraper script using getWaterInfo.js as example
  3. Replace getWaterInfo in .github/workflows/runner.yml
  4. Create your bot by chatting to BotFather and setup TOKEN secret (github.com/user/repo/settings/secrets/actions)
  5. Create channel and setup CHANNEL secret
  6. Add bot to the channel as admin
  7. Get chat id for error reporting:
    1. Write to your bot
    2. Run npm run chat_id
    3. Set ADMIN_CHAT_ID secret (you can use it for debugging instead of CHANNEL)
  8. Create credentials for docker hub here.
  9. Set DOCKERHUB_TOKEN and DOCKERHUB_USERNAME secrets.