def __init__(self): super().__init__() self.headers['User-Agent'] = useragents.FIREFOX self.timeout = 20.0 self.mount('file://', FileAdapter())
def __init__(self, *args, **kwargs): Session.__init__(self, *args, **kwargs) if self.headers['User-Agent'].startswith('python-requests'): self.headers['User-Agent'] = useragents.FIREFOX self.timeout = 20.0 self.mount('file://', FileAdapter())
def __init__(self, *args, **kwargs): Session.__init__(self, *args, **kwargs) self.timeout = 20.0 if TIMEOUT_ADAPTER_NEEDED: self.mount("http://", HTTPAdapterWithReadTimeout()) self.mount("https://", HTTPAdapterWithReadTimeout()) self.mount('file://', FileAdapter())
def __init__(self, *args, **kwargs): Session.__init__(self, *args, **kwargs) if self.headers['User-Agent'].startswith('python-requests'): self.headers['User-Agent'] = useragents.FIREFOX self.timeout = 20.0 if TIMEOUT_ADAPTER_NEEDED: self.mount("http://", HTTPAdapterWithReadTimeout()) self.mount("https://", HTTPAdapterWithReadTimeout()) self.mount('file://', FileAdapter())