Fixed error:

ERROR    Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x7f00643ef490>
This commit is contained in:
Schimon Jehudah 2023-12-18 16:09:33 +00:00
parent 0c80c722bb
commit ccd01b837d

View file

@ -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: