import ssl from requests.adapters import HTTPAdapter from requests.packages.urllib3.poolmanager import PoolManager class SSLv3Adapter(HTTPAdapter): '''An HTTPS Transport Adapter that uses SSLv3 rather than the default SSLv23, for servers which only speak v3.''' def init_poolmanager(self, connections, maxsize, block=False): self.poolmanager = PoolManager(num_pools=connections, maxsize=maxsize, block=block, ssl_version=ssl.PROTOCOL_SSLv3)