Created
March 9, 2020 12:32
-
-
Save zhombie/8c06aecf77062babc0016d26409a3149 to your computer and use it in GitHub Desktop.
Fetch full info from channel username
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
access_hash = await db.fetchval( | |
''' | |
SELECT extra ->> 'access_hash' | |
FROM scanning.accounts | |
WHERE channel = $1 | |
''', | |
'tg' | |
) | |
tg = TelegramStreaming( | |
rules=None, | |
loop=loop, | |
access_hash=access_hash | |
) | |
await tg.client.start(phone=TelegramClient.PHONE) | |
# await self.client(functions.channels.GetFullChannelRequest(channel=channel_id)) | |
channel_info = await tg.get_channel_full_info('kimkibabaduk') | |
print(channel_info) | |
print('\n') | |
print(channel_info.stringify()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment