Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

is there any way to save all text-data from a telegram channel using a bot?

I need to save all text-data from a public channel of telegram in a text file. (so I can do some analysis on it later) is it possible to write a bot that can do such thing?

like image 962
zmeftah Avatar asked Nov 22 '15 15:11

zmeftah


3 Answers

There is a project https://github.com/xtrime-ru/TelegramApiServer that allows you to fetch Telegram public channel in forms of JSON.

Its testing site is https://tg.i-c-a.su/

like image 175
Angus Avatar answered Sep 21 '22 13:09

Angus


Follow the instruction below:

  • Open the group in the Telegram Desktop app.
  • Click on three dots on the top-right corner.
  • Choose Export chat history
  • Select everything you want (in checkmark list)
  • Choose the maximum size of videos and pictures you want
  • Choose a folder by clicking on the destination in the link bottom
  • Start to export

Everything (Docs, Medias, Chats, ...) will be exported in the desired folder.
Done!

like image 30
Reza K Ghazi Avatar answered Sep 21 '22 13:09

Reza K Ghazi


It's possible only for groups. If you disable privacy mode for the bot. But channels don't allow it. You can add bot as administrator of channel, but bot won't receive messages sending by other administrators.

like image 39
Stas Parshin Avatar answered Sep 20 '22 13:09

Stas Parshin