mirror of
https://gitee.com/g1879/DrissionPage.git
synced 2024-12-10 04:00:23 +08:00
微调
This commit is contained in:
parent
cb5527b18e
commit
8a7363e77d
@ -30,7 +30,7 @@ class BaseParser(object):
|
|||||||
return
|
return
|
||||||
|
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
def ele(self, loc_or_ele, mode, timeout):
|
def ele(self, loc_or_ele, mode='single', timeout=None):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
@ -75,7 +75,7 @@ class BaseElement(BaseParser):
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
def ele(self, loc_or_str, mode, timeout):
|
def ele(self, loc_or_str, mode='single', timeout=None):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
@ -228,7 +228,7 @@ class BasePage(BaseParser):
|
|||||||
@property
|
@property
|
||||||
def title(self) -> Union[str, None]:
|
def title(self) -> Union[str, None]:
|
||||||
"""返回网页title"""
|
"""返回网页title"""
|
||||||
ele = self('x:/html/head/title')
|
ele = self.ele('x:/html/head/title')
|
||||||
return ele.text if ele else None
|
return ele.text if ele else None
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@ -281,7 +281,7 @@ class BasePage(BaseParser):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
def ele(self, loc_or_ele, mode, timeout):
|
def ele(self, loc_or_ele, mode='single', timeout=None):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
|
Loading…
x
Reference in New Issue
Block a user