mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-06 16:07:01 +08:00
refactor(browser): decouple Playwright types with protocol interfaces and remove direct dependency
This commit is contained in:
@@ -2,9 +2,8 @@ import base64
|
||||
from typing import Tuple, Optional
|
||||
|
||||
from lxml import etree
|
||||
from playwright.sync_api import Page
|
||||
|
||||
from app.helper.browser import PlaywrightHelper
|
||||
from app.helper.browser import BrowserPage, PlaywrightHelper
|
||||
from app.helper.ocr import OcrHelper
|
||||
from app.helper.twofa import TwoFactorAuth
|
||||
from app.log import logger
|
||||
@@ -88,7 +87,7 @@ class CookieHelper:
|
||||
:return: cookie、ua、message
|
||||
"""
|
||||
|
||||
def __page_handler(page: Page) -> Tuple[Optional[str], Optional[str], str]:
|
||||
def __page_handler(page: BrowserPage) -> Tuple[Optional[str], Optional[str], str]:
|
||||
"""
|
||||
页面处理
|
||||
:return: Cookie和UA
|
||||
|
||||
Reference in New Issue
Block a user