python3 requests使用连接池

import requests

session = requests.Session()
session.mount('http://', requests.adapters.HTTPAdapter(pool_connections=1, pool_maxsize=20, max_retries=3))

session.get("http://lr.cool")
posted @ 2019-08-22 18:27  lr.cool  阅读(...)  评论(...编辑  收藏