Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- async def get(url):
- #...
- response = await aiohttp.request('get', url)
- # вызывается из:
- async def fetch():
- #...
- data = await get('yoba.dot')
- #которая, вызывается так
- async def main():
- #...
- # может надо так?
- with (await asyncio.Semaphore(10)):
- with aiohttp.Timeout(30):
- results = await asyncio.gather(*[fetch(u) for u in request_data['urls']])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement