修改获取title的语句

This commit is contained in:
g1879 2021-08-13 13:54:48 +00:00 committed by Gitee
parent 98b02f3452
commit 0e0d99e878

View File

@ -228,7 +228,7 @@ class BasePage(BaseParser):
@property
def title(self) -> Union[str, None]:
"""返回网页title"""
ele = self('t:title')
ele = self('x:html/head/title')
return ele.text if ele else None
@property