fix: 调整登录检测入口URL

无 Shopee tab 时,登录检测改为打开卖家中心根地址 https://<region_host>/,默认 https://seller.shopee.tw/。

商品编辑 URL 仍保持 /portal/product 路径不变;更新登录检测单测与 API/架构/当前状态/progress 文档。
This commit is contained in:
chengma
2026-06-27 12:05:33 +08:00
parent 6e00b1b093
commit 8fe979942c
6 changed files with 22 additions and 10 deletions
+4 -4
View File
@@ -116,8 +116,8 @@ def _region_host(account=None):
return value.strip("/") or DEFAULT_REGION_HOST
def _portal_url(account):
return f"https://{_region_host(account)}/portal/"
def _seller_home_url(account):
return f"https://{_region_host(account)}/"
def _product_url(account, item_id):
@@ -220,8 +220,8 @@ def login_status(account, timeout=8) -> dict:
pages = [t for t in http_get("/json", host=host) if t.get("type") == "page"]
shopee_page = next((p for p in pages if "shopee" in (p.get("url") or "")), None)
if not shopee_page:
ws = create_tab(_portal_url(account), host=host)
initial_url = _portal_url(account)
ws = create_tab(_seller_home_url(account), host=host)
initial_url = _seller_home_url(account)
cdp = CDP(ws)
else:
initial_url = shopee_page.get("url") or ""