Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get feed of Telegram channel

Tags:

telegram

feed

I need to show telegram channel posts in a website. but I don't know how to export telegram channel into xml. I need to have both texts and images and also other files and media like mp4 - pdf or other things. Is there any way to do that?

like image 295
Mahdir Avatar asked Dec 23 '22 17:12

Mahdir


1 Answers

In three steps:

  • First you need create a bot with @botfather. Then add bot to channel. (There is no need to make bot admin.)
  • Second use a programming language and write a program that receives message from channel and send it to server.
  • Third you must provide a way in site back-end to receive posts that your program sends.

For second step i suggest you to use python. there are some modules that can deal with bots.i think in your case telepot can be simplest module that do everything you need.

For third step you must add more details about your site back-end. anyway i suggest you to write a Restful API for back-end and send posts to site with python requests module.

like image 73
Alireza Afzal Aghaei Avatar answered Dec 28 '22 11:12

Alireza Afzal Aghaei