摘要: ``` from async_retrying import retry import aiohttp import asyncio @retry(attempts=6) async def fetch(): print(1) async with aiohttp.ClientSession() as session: async with session.ge... 阅读全文
posted @ 2019-03-21 17:18 公众号python学习开发 阅读(826) 评论(0) 推荐(0) 编辑
摘要: import asyncio import aiojobs async def coro(timeout): print(timeout) await asyncio.sleep(timeout) print(">>>>>>>") async def main(): scheduler = await aiojobs.create_scheduler() ... 阅读全文
posted @ 2019-03-21 16:12 公众号python学习开发 阅读(463) 评论(0) 推荐(0) 编辑
摘要: from multidict import CIMultiDict dic=CIMultiDict() dic["key"]="1234" print(dic["KEy"]) 阅读全文
posted @ 2019-03-21 15:44 公众号python学习开发 阅读(3725) 评论(0) 推荐(1) 编辑
摘要: import aiohttp import asyncio import async_timeout from urllib.parse import urljoin, urldefrag root_url = "http://python.org/" crawled_urls, url_hub = [], [root_url, "%s/sitemap.xml" % (root_url), ... 阅读全文
posted @ 2019-03-21 15:10 公众号python学习开发 阅读(2083) 评论(1) 推荐(0) 编辑