def __init__(self, service_url: str) -> dict: self.service_url = service_url jar = aiohttp.CookieJar(unsafe=True) self.session = aiohttp.ClientSession( timeout=ClientTimeout(total=10), headers={"User-Agent": get_agent()}, cookie_jar=jar)
def __init__(self, hostname): self.hostname = hostname self.url = f'http://{hostname}:{PORT}' self.session = aiohttp.ClientSession( timeout=ClientTimeout(total=100), headers={"User-Agent": get_agent()}, cookie_jar=aiohttp.CookieJar(unsafe=True))
def __init__(self, hostname: str): self.hostname = hostname self.session = aiohttp.ClientSession( timeout=ClientTimeout(total=10), headers={"User-Agent": get_agent()})
def __init__(self, hostname: str): self.url = f'http://{hostname}:{API.PORT}' self.session = ClientSession(timeout=ClientTimeout(total=120), headers={"User-Agent": get_agent()})