diff --git a/DrissionPage/base.py b/DrissionPage/base.py index 46b76a3..f10ced5 100644 --- a/DrissionPage/base.py +++ b/DrissionPage/base.py @@ -283,7 +283,7 @@ class BasePage(BaseParser): @property def title(self) -> Union[str, None]: """返回网页title""" - ele = self.ele('xpath:/html/head/title') + ele = self.ele('xpath://title') return ele.text if ele else None @property diff --git a/DrissionPage/drission.py b/DrissionPage/drission.py index 9607762..683b83c 100644 --- a/DrissionPage/drission.py +++ b/DrissionPage/drission.py @@ -434,7 +434,7 @@ def _create_chrome(chrome_path: str, port: str, args: list, proxy: dict) -> tupl debugger = Popen(f'{chrome_path} --remote-debugging-port={port} {args}', shell=False) if chrome_path == 'chrome.exe': - from common import get_exe_path_from_port + from .common import get_exe_path_from_port chrome_path = get_exe_path_from_port(port) # 传入的路径找不到,主动在ini文件、注册表、系统变量中找