A CLI tool to extract Telegram channel statistics as ndJSON.
git clone https://github.com/orsinium-labs/telegram-stat.git
cd telegram-stat
python3 -m pip install -r requirements.txtTo get access to telegram API, you'll need api_id and api_hash that you can obtain at my.telegram.org.
Get statistics for @pythonetc:
python3 -m telegram_stat \
--channel pythonetc \
--api-id 12345
--api-hash 1234567890abcdef \
> pythonetc.ndjsonSee top_posts.ipynb for an example on how to analyze the resulting data using pandas.