Skip to content

Instantly share code, notes, and snippets.

@zhombie
Created March 9, 2020 12:32
Show Gist options
  • Save zhombie/8c06aecf77062babc0016d26409a3149 to your computer and use it in GitHub Desktop.
Save zhombie/8c06aecf77062babc0016d26409a3149 to your computer and use it in GitHub Desktop.
Fetch full info from channel username
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