Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/orsinium-labs/telegram-stat
CLI tool to extract Telegram channel statistics as JSON.
https://github.com/orsinium-labs/telegram-stat
data-science ipython jupyter pandas python statistics telegram telethon
Last synced: 24 days ago
JSON representation
CLI tool to extract Telegram channel statistics as JSON.
- Host: GitHub
- URL: https://github.com/orsinium-labs/telegram-stat
- Owner: orsinium-labs
- License: mit
- Created: 2021-12-31T09:03:07.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2021-12-31T09:04:57.000Z (almost 3 years ago)
- Last Synced: 2024-09-29T18:40:12.156Z (about 1 month ago)
- Topics: data-science, ipython, jupyter, pandas, python, statistics, telegram, telethon
- Language: Jupyter Notebook
- Homepage:
- Size: 8.79 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# telegram-stat
A CLI tool to extract [Telegram](https://telegram.org/) channel statistics as [ndJSON](http://ndjson.org/).
## Installation
```bash
git clone https://github.com/orsinium-labs/telegram-stat.git
cd telegram-stat
python3 -m pip install -r requirements.txt
```## Usage
To get access to telegram API, you'll need `api_id` and `api_hash` that you can obtain at [my.telegram.org](https://my.telegram.org/apps).
Get statistics for [@pythonetc](https://t.me/s/pythonetc):
```bash
python3 -m telegram_stat \
--channel pythonetc \
--api-id 12345
--api-hash 1234567890abcdef \
> pythonetc.ndjson
```See [top_posts.ipynb](./top_posts.ipynb) for an example on how to analyze the resulting data using [pandas](https://pandas.pydata.org/).