爬虫高并发之异步IO

1.asyncio模块html @asyncio.coroutine def task(): print('start...') yield from asyncio.sleep(5) #不支持HTTP请求,支持TCP请求 #但HTTP请求就是基于TCP封装的,因此咱们能够基于TCP协议发送 #HTTP请求 print('end') tasks=[task
相关文章
相关标签/搜索