CCS: use API

This commit is contained in:
tobtoht
2020-12-03 16:03:09 +01:00
parent fe8c6ba241
commit ea06a781a6
2 changed files with 5 additions and 61 deletions
+1 -1
View File
@@ -87,7 +87,7 @@ async def broadcast_nodes():
async def httpget(url: str, json=True):
timeout = aiohttp.ClientTimeout(total=4)
timeout = aiohttp.ClientTimeout(total=30)
headers = {"User-Agent": random_agent()}
async with aiohttp.ClientSession(timeout=timeout) as session:
async with session.get(url, headers=headers) as response: