fix: detect shopee accounts login page
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user