Skip to content
View Pharmaceutical0's full-sized avatar

Block or report Pharmaceutical0

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Please don't include any personal information such as legal names or email addresses. Maximum 100 characters, markdown supported. This note will be visible to only you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
Pharmaceutical0/README.md

from telethon.sync import TelegramClient

Replace with your own values

api_id = '22464672' api_hash = 'a2b288274c99d0077624e63a6a3e3422' phone_number = '+601117181434'

List of channel usernames to rank

channel_usernames = ['@andreybogdanov', '@andreybogdanov', '@andreybogdanov']

def get_channel_info(client, username): try: channel = client.get_entity(username) return { 'username': username, 'title': channel.title, 'subscribers': channel.participants_count } except Exception as e: print(f"Failed to get info for {username}: {e}") return None

def main(): with TelegramClient(phone_number, api_id, api_hash) as client: channel_data = [] for username in channel_usernames: info = get_channel_info(client, username) if info: channel_data.append(info)

    # Sort channels by number of subscribers
    sorted_channels = sorted(channel_data, key=lambda x: x['subscribers'], reverse=True)
    
    # Print ranked channels
    for rank, channel in enumerate(sorted_channels, start=1):
        print(f"{rank}. {channel['title']} (@{channel['username']}) - Subscribers: {channel['subscribers']}")

if name == "main": main()

Popular repositories Loading

  1. Fitrxpharmacy.com Fitrxpharmacy.com Public

    To rank bot on telegram

    Python 1

  2. telegram-bot-api telegram-bot-api Public

    Forked from go-telegram-bot-api/telegram-bot-api

    Golang bindings for the Telegram Bot API

    Go 1

  3. rake-nltk rake-nltk Public

    Forked from csurfer/rake-nltk

    Python implementation of the Rapid Automatic Keyword Extraction algorithm using NLTK.

    Python

  4. Caliplug-Zaza-Pharmacy- Caliplug-Zaza-Pharmacy- Public

  5. Pharmaceutical0 Pharmaceutical0 Public

    Config files for my GitHub profile.

  6. ultimate-python ultimate-python Public

    Forked from huangsam/ultimate-python

    Ultimate Python study guide for newcomers and professionals alike. 🐍 🐍 🐍

    Python