Skip to content

Monitor story of instagram account & send to telegram on every update

License

Notifications You must be signed in to change notification settings

2pai-dev/instastory-monitor-telegram

 
 

Repository files navigation

Instagram Story Monitor

All Contributors

Monitor story your target instagram account & send to telegram on every update. This app also Inlcuding auto backup locally & frontend for local metadata-story explorer.

How To Use 📚

  1. Clone this Repository
git clone https://github.com/2pai/instastory-monitor-telegram
  1. Fill the .env file based on .env.example
cp .env.example .env
  1. Install the dependency
npm install
  1. Run the app in order
npm run collect  # collect instagram story metadata
npm run dispatch # dispatch / send instagram story to telegram
npm run download # download content locally
npm run frontend # run the frontend to serve metadata

or simply by using orchestrator.sh

chmod +x ./orchestrator.sh
./orchestrator.sh

You can also run the orchestrator with CronJob to update the metadata & dispatch periodically.

Architecture 🏹

image

collector.js

This collector will be collecting instagram story metadata from instagram private api then compare it (with local metadata) & store/append it to metadata-story.json

The metadata structure will be

{
    id, // uniquie id
    url, // url content
    mediaType, // 1 for image, 2 for video
    path, // path to store content locally, format yyyy/M/dd
    timestamp,
    send, // status dispatcher
    downloaded, // status downloader
}

dispatcher.js

This dispatcher will read the metadata-story.json and check if the send property was false then the dispatcher will send the media (based on media type) to the defined chatId telegram.

If the dispatcher success send the media to the telegram, it will update the metadata send to true.

downloader.js

This downloader will read the metadata-story.json and check if the downloaded property was false then the downloader will download the media (based on media type) locally to the defined path on metadata, the path was using yyyy/M/dd to make searching the content more easy (if needed).

If the downloader success download the media locally, it will update the metadata downloaded to true.

index.js (frontend)

Serve the metadata-story.json with simple frontend to make exploring the instagram story more easily.

Contributors ✨

Thanks goes to these wonderful people :


Imperial Owl

💻

Iqbal syamil ayasy

💻 📖

This project follows the all-contributors specification. Contributions of any kind welcome!

About

Monitor story of instagram account & send to telegram on every update

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 67.9%
  • HTML 30.2%
  • Shell 1.9%