aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJinwei Zhao <[email protected]>2017-01-31 18:58:52 +0800
committerJinwei Zhao <[email protected]>2017-01-31 18:58:52 +0800
commitdf17a8695cba8f643593664f383912951e234540 (patch)
tree5624ceb012ed7f7a3f65041868d4df90e455a14e /async_test.py
parent4ff09e48ea275d30040cf99e763936977f983c67 (diff)
downloadCOMM2TG-df17a8695cba8f643593664f383912951e234540.tar.gz
remove urllib.parse.quote
Diffstat (limited to 'async_test.py')
-rw-r--r--async_test.py25
1 files changed, 25 insertions, 0 deletions
diff --git a/async_test.py b/async_test.py
new file mode 100644
index 0000000..41f5cd7
--- /dev/null
+++ b/async_test.py
@@ -0,0 +1,25 @@
1'''
2import aiohttp
3import asyncio
4import async_timeout
5
6async def fetch(session, url):
7 with async_timeout.timeout(10):
8 async with session.get(url) as response:
9 return await response.text()
10
11async def main(loop):
12 async with aiohttp.ClientSession(loop=loop) as session:
13 html = await fetch(session, 'http://python.org')
14 print(html)
15
16loop = asyncio.get_event_loop()
17loop.run_until_complete(main(loop))
18'''
19
20
21import telegram
22
23bot = telegram.Bot('243806890:AAEFw0bAA2E5hkxtprb7qGM7mZSlcevQs4Y')
24
25bot.sendMessage(chat_id='-1001052481058', text="Hello") \ No newline at end of file
Powered by cgit v1.2.3 (git 2.41.0)