fixed logged in function
All checks were successful
continuous-integration/drone Build is passing

This commit is contained in:
Amazed 2022-07-18 20:27:00 +02:00
parent 01914e0f5a
commit d50935d0c5
2 changed files with 3 additions and 3 deletions

View File

@ -34,7 +34,7 @@ def is_logged_in():
if not BROWSER.response(): if not BROWSER.response():
return False return False
try: try:
return b'<li id="username_logged_in" class="rightside " data-skip-responsive="true">\n\t\t\t\t\t\t<div class="header-profile dropdown-container">\n\t\t\t\t<a href="./ucp.php" class="header-avatar dropdown-trigger"> <span class="username">' + USERNAME.encode("utf8") in BROWSER.response().get_data() return b'<a href="./ucp.php" class="header-avatar dropdown-trigger"><span class="username">'+USERNAME.encode("utf8")+b'</span>' in BROWSER.response().get_data()
except http.client.IncompleteRead: except http.client.IncompleteRead:
BROWSER = mechanize.Browser() BROWSER = mechanize.Browser()
return is_logged_in() return is_logged_in()

View File

@ -1,3 +1,3 @@
requests~=2.23.0 requests==2.28.1
mechanize~=0.4.5 mechanize~=0.4.5
beautifulsoup4~=4.9.1 beautifulsoup4==4.11.1