From ccd01b837da4237b9c03bb1f6f02e0f5278a1364 Mon Sep 17 00:00:00 2001 From: Schimon Jehudah Date: Mon, 18 Dec 2023 16:09:33 +0000 Subject: [PATCH] Fixed error: ERROR Unclosed client session client_session: --- slixfeed/datahandler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/slixfeed/datahandler.py b/slixfeed/datahandler.py index 4a289a6..5860ba2 100644 --- a/slixfeed/datahandler.py +++ b/slixfeed/datahandler.py @@ -532,7 +532,7 @@ async def download_feed(url): except: user_agent = "Slixfeed/0.1" timeout = ClientTimeout(total=10) - headers = {user_agent} + headers = {'User-Agent': user_agent} async with ClientSession(headers=headers) as session: # async with ClientSession(trust_env=True) as session: try: