Answer the question
In order to leave comments, you need to log in
How to do "Monitoring the number of subscribers of my Telegram channel every minute"?
Tell me the easiest way to implement monitoring of the number of subscribers of my Telegram channel so that the statistics from my channel are parsed and updated every minute.
And the data was displayed to me in this format "time and number of subscribers":
Example:
March 1 20:50 - 4000
March 1 20:51 - 4001
March 1 20:52 - 4007
March 1 20:53 - 4006
Where:
March 1 20: 50 is the date and time
4000 is the number of subscribers at that point in time
Answer the question
In order to leave comments, you need to log in
You get the channel page, regularly pull out the number of participants, write the data to a file.
And you do a CRON task.
there is no such method in the API,
I think it is necessary to save / update in the database of users who write to the channel. Together with the time of writing the last message, let's say in the last_reply field (timestamp)
the number of online users can be selected from the database for the last 5 minutes, approximately
wrote in the last 5 minutes, so online
you can also make a selection per minute
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question