Skip to content

Instantly share code, notes, and snippets.

@dyus
Created July 24, 2017 14:06
Show Gist options
  • Save dyus/f61e1f52a74adc8916b7ffb49ede63d2 to your computer and use it in GitHub Desktop.
Save dyus/f61e1f52a74adc8916b7ffb49ede63d2 to your computer and use it in GitHub Desktop.
from aiohttp import client
a = client.ClientSession()
async def b():
async with a.get('https://videso.rambler.ru', timeout=0.01) as r:
print(await r.text())
import asyncio
asyncio.get_event_loop().run_until_complete(b())
a.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment