Telegram channel bot scraper that saves the content locally:
- messages into raw json
- media (photo/video)
- documents
To make it happen you just need to invite your bot to the channel! Easy!
If you write directly to the bot with inline command /status {channel}
,
it responds with the count of stored messages for the given channel.
File format
- for messages is
{YYYY-MM-DD_HH-mm-ss}_{message_id}
- for media and files
{YYYY-MM-DD_HH-mm-ss}_{file_id}
- copy
.env.example
file for your local.env
and set vars - create your telegram bot by instruction
npm i
- Check that you have folder
data
in the root of the app npm run dev
(it requires nodemon)
- copy
.env.example
file for your local.env
and set vars - create your telegram bot by instruction
npm i
- Check that you have folder
data
in the root of the app pm2 start index.js
(it requires pm2)