Ejemplo n.º 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)
Ejemplo n.º 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))
Ejemplo n.º 3
0
 def __init__(self, hostname: str):
     self.hostname = hostname
     self.session = aiohttp.ClientSession(
         timeout=ClientTimeout(total=10),
         headers={"User-Agent": get_agent()})
Ejemplo n.º 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()})