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

Commit 98a1a1b

Browse files
Update login.py
1 parent d4cf3d3 commit 98a1a1b

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
@@ -96,7 +96,7 @@ def get_nick_and_pw(server):
9696
session = ClientSession(headers=headers)
9797

9898

99-
async def get_content(link, data=None, login_first=False, return_url=False):
99+
async def get_content(link, data=None, login_first=False, return_url=False, first_run=False):
100100
"""
101101
Return types:
102102
Method post -> respond url (unless fight.html in link -> tree and url)
@@ -112,7 +112,7 @@ async def get_content(link, data=None, login_first=False, return_url=False):
112112

113113
server = link.split("#")[0].replace("http://", "https://").split("https://")[1].split(".e-sim.org")[0]
114114
method = "get" if not data and "fight.html" not in link and "medkit.html" not in link else "post"
115-
if login_first:
115+
if login_first or first_run:
116116
await login(server)
117117
async with session.get(link, cookies=cookies[server], headers=headers) if method == "get" else \
118118
session.post(link, cookies=cookies[server], headers=headers, data=data) as respond:

0 commit comments

Comments
 (0)