From 7c4c3b3f9ace8ed9e011ba3edf3333ff100189f0 Mon Sep 17 00:00:00 2001 From: jxxghp Date: Sat, 23 Sep 2023 12:30:19 +0800 Subject: [PATCH] =?UTF-8?q?feat=20=E6=94=AF=E6=8C=81=E6=96=B0=E7=89=88?= =?UTF-8?q?=E6=9C=ACmteam?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/utils/site.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/app/utils/site.py b/app/utils/site.py index 48666469..1fd41cf2 100644 --- a/app/utils/site.py +++ b/app/utils/site.py @@ -22,14 +22,12 @@ class SiteUtils: ' or contains(@href, "mybonus") ' ' or contains(@onclick, "logout")' ' or contains(@href, "usercp")]', - '//form[contains(@action, "logout")]'] + '//form[contains(@action, "logout")]', + '//div[@class="user-info-side"]', + '//a[contains(@href, "/profile/detail/")]'] for xpath in xpaths: if html.xpath(xpath): return True - user_info_div = html.xpath('//div[@class="user-info-side"]') - if user_info_div: - return True - return False @classmethod