爬蟲高併發之異步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
相關文章
相關標籤/搜索