def __init__(self, pp, headers={}, proxy_headers={},
max_retries=0, timeout=60, ca_certs=None,
discard_timeout=False):
'''pp - proxypool to use
headers - the headers to use in the underlying requests.Session
max_retries and timeout - the same as in ClientSession.
discard_timeout set to True will discard timed out proxies. Should have some sort of refresh, or we'll run out of proxies
'''
self.pp = pp # Proxypool
self.p = None
self.headers=headers # To use when downloading
self.proxy_headers=proxy_headers # To use when downloading
self.max_retries=max_retries
self.timeout=timeout
self.discard_timeout=discard_timeout
self.ca_certs=ca_certs
self.s=None
评论列表
文章目录