File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -73,15 +73,15 @@ def check_page_raise(page: BeautifulSoup) -> None:
7373 if any (m in error_text for m in not_found_messages ):
7474 raise NotFound
7575 else :
76- raise ServerError (* filter (bool , error_text .splitlines ()))
76+ raise ServerError (* filter (bool , map ( str . strip , error_text .splitlines () )))
7777 elif notice := page .select_one ("section.notice-message" ):
78- notice_text : str = p .text .lower () if ( p := notice . find ( "p" )) else ""
78+ notice_text : str = notice .text .lower ()
7979 if "deactivated" in notice_text :
8080 raise DisabledAccount
8181 elif any (m in notice_text for m in not_found_messages ):
8282 raise NotFound
8383 else :
84- raise NoticeMessage (* filter (bool , notice_text .splitlines ()))
84+ raise NoticeMessage (* filter (bool , map ( str . strip , notice_text .splitlines () )))
8585
8686
8787def username_url (username : str ) -> str :
You can’t perform that action at this time.
0 commit comments