Example #1
0
 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)
Example #2
0
 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))
Example #3
0
 def __init__(self, hostname: str):
     self.hostname = hostname
     self.session = aiohttp.ClientSession(
         timeout=ClientTimeout(total=10),
         headers={"User-Agent": get_agent()})
Example #4
0
 def __init__(self, hostname: str):
     self.url = f'http://{hostname}:{API.PORT}'
     self.session = ClientSession(timeout=ClientTimeout(total=120),
                                  headers={"User-Agent": get_agent()})