fix: detect shopee accounts login page

This commit is contained in:
chengma
2026-07-02 22:38:08 +08:00
parent b9f614b8e7
commit dd2a8e3360
9 changed files with 52 additions and 11 deletions
+7
View File
@@ -19,6 +19,7 @@ ITEMBOX_XPATH = (
LOGIN_PATH_MARKERS = (
"/login",
"account/signin",
"accounts.shopee.tw/seller/login",
"seller/login",
"seller/accounts/signin",
)
@@ -339,6 +340,12 @@ def _image_root(account):
def _is_login_url(url):
value = (url or "").lower()
try:
parsed = urlparse(value)
if parsed.netloc.startswith("accounts.shopee.") and parsed.path.startswith("/seller/login"):
return True
except Exception:
pass
return any(marker in value for marker in LOGIN_PATH_MARKERS)