aboutsummaryrefslogtreecommitdiff
blob: 41f5cd7824cf10cdaa52d206bf9dccf14497c558 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
'''
import aiohttp
import asyncio
import async_timeout

async def fetch(session, url):
    with async_timeout.timeout(10):
        async with session.get(url) as response:
            return await response.text()

async def main(loop):
    async with aiohttp.ClientSession(loop=loop) as session:
        html = await fetch(session, 'http://python.org')
        print(html)

loop = asyncio.get_event_loop()
loop.run_until_complete(main(loop))
'''


import telegram

bot = telegram.Bot('243806890:AAEFw0bAA2E5hkxtprb7qGM7mZSlcevQs4Y')

bot.sendMessage(chat_id='-1001052481058', text="Hello")
Powered by cgit v1.2.3 (git 2.41.0)