D
D
destrix2021-01-08 23:37:05
Python
destrix, 2021-01-08 23:37:05

How to make a telegram message recipient in python?

Help me make a simple python program that will copy the text of messages from my telegram account (or from a bot) that come from different groups and chats in telegram.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Aress9, 2021-01-09
@Aress9

From a bot or account? These are quite different things
. If you want to emulate the work of the client, then the mtproto protocol is used in the telegram. The easiest way to interact with it is with a ready made library like Pyrogram .
If you want to receive messages from the bot, then the telegram has an api. Again, here is the library .

D
Daemon23RUS, 2017-04-04
@nexus0

Provided that nothing needs to be changed in the browser, you need a transparent proxy. Alternatively, you need to enable routing on the gateway, and forward all packets going to the 80th port to a transparent proxy (for example, to port 3128) and on this port raise the proxy in transparent mode (for a squid, this is a line in the http_port 3128 transparent config)
There are plenty of configuration examples, for example https://habrahabr.ru/sandbox/39160/
Reverse proxy: you can use Nginx you need a line in the configuration will look something like this

location / 
{
proxy_pass http://$http_host;
}
In the process of setting up, using the documentation, you can customize for your tasks

V
Victor Taran, 2017-04-04
@shambler81

proxy - requires configuration in every software, so you're probably talking about NAT?
https://habrahabr.ru/sandbox/18975/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question