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?
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.
You need to use telegram API to access the content of a channel.
Telegram API is fairly complicated. There are clients in different languages that makes it easier to interact with the API.
I personally worked with Telethon and it's relatively simple to get it work. If you follow the directions on the home page, there is also an interactive client you can play around to get yourself familiar with how it works.
If you are familiar with other languages there are clients for those languages as well. If you prefer any specific language please comment.
© 2022 - 2024 — McMap. All rights reserved.