def fetch(url, session, params, method='GET', t=10):
with timeout(t):
resp = yield from session.request(method.lower(), url, params=params)
try:
return resp
except (asyncio.TimeoutError, aiohttp.ClientError) as err:
LOG.exception(err)
评论列表
文章目录