Skip to content
This repository was archived by the owner on Mar 11, 2022. It is now read-only.

Commit 65cc538

Browse files
authored
Update login.py
1 parent 9a18d7b commit 65cc538

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Help_functions/login.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,8 @@ def get_nick_and_pw(server):
9494
headers = {"User-Agent": 'Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:84.0) Gecko/20100101 Firefox/84.0'}
9595
cookies = {"user_agent": 'Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:84.0) Gecko/20100101 Firefox/84.0'}
9696
async def create_session():
97-
session = ClientSession(headers=headers)
98-
loop.create_task(create_session())
97+
return ClientSession(headers=headers)
98+
session = loop.run_until_complete(create_session())
9999

100100
async def get_content(link, data=None, login_first=False, return_url=False):
101101
"""

0 commit comments

Comments
 (0)