mirror of
https://gitee.com/g1879/DrissionPage.git
synced 2024-12-10 04:00:23 +08:00
4.0.4.3(+)
增加add_ele() run_js()可读取文件 修复旧版python中get()报错问题 click.multiple()改为click.multi()
This commit is contained in:
parent
7e08dea72e
commit
ec6a2d4494
@ -14,4 +14,4 @@ from ._configs.chromium_options import ChromiumOptions
|
|||||||
from ._configs.session_options import SessionOptions
|
from ._configs.session_options import SessionOptions
|
||||||
|
|
||||||
__all__ = ['ChromiumPage', 'ChromiumOptions', 'SessionOptions', 'SessionPage', 'WebPage', '__version__']
|
__all__ = ['ChromiumPage', 'ChromiumOptions', 'SessionOptions', 'SessionPage', 'WebPage', '__version__']
|
||||||
__version__ = '4.0.4.2'
|
__version__ = '4.0.4.3'
|
||||||
|
@ -405,7 +405,7 @@ class BasePage(BaseParser):
|
|||||||
:return: 重试次数、间隔、是否文件组成的tuple
|
:return: 重试次数、间隔、是否文件组成的tuple
|
||||||
"""
|
"""
|
||||||
is_file = False
|
is_file = False
|
||||||
if isinstance(url, Path) or '://' not in url or ':\\\\' not in url:
|
if isinstance(url, Path) or ('://' not in url and ':\\\\' not in url):
|
||||||
p = Path(url)
|
p = Path(url)
|
||||||
if p.exists():
|
if p.exists():
|
||||||
url = str(p.absolute())
|
url = str(p.absolute())
|
||||||
|
@ -668,7 +668,7 @@ class ChromiumBase(BasePage):
|
|||||||
if ele:
|
if ele:
|
||||||
self.run_cdp('DOM.removeNode', nodeId=ele._node_id)
|
self.run_cdp('DOM.removeNode', nodeId=ele._node_id)
|
||||||
|
|
||||||
def add_ele(self, outerHTML, insert_to, before=None):
|
def add_ele(self, outerHTML, insert_to=None, before=None):
|
||||||
"""新建一个元素
|
"""新建一个元素
|
||||||
:param outerHTML: 新元素的html文本
|
:param outerHTML: 新元素的html文本
|
||||||
:param insert_to: 插入到哪个元素中,可接收元素对象和定位符,为None添加到body
|
:param insert_to: 插入到哪个元素中,可接收元素对象和定位符,为None添加到body
|
||||||
|
@ -216,7 +216,7 @@ class ChromiumBase(BasePage):
|
|||||||
|
|
||||||
def add_ele(self,
|
def add_ele(self,
|
||||||
outerHTML: str,
|
outerHTML: str,
|
||||||
insert_to: Optional[ChromiumElement, str, Tuple[str, str]],
|
insert_to: Optional[ChromiumElement, str, Tuple[str, str]] = None,
|
||||||
before: Optional[ChromiumElement, str, Tuple[str, str]] = None) -> ChromiumElement: ...
|
before: Optional[ChromiumElement, str, Tuple[str, str]] = None) -> ChromiumElement: ...
|
||||||
|
|
||||||
def get_frame(self, loc_ind_ele: Union[str, int, tuple, ChromiumFrame], timeout: float = None) -> ChromiumFrame: ...
|
def get_frame(self, loc_ind_ele: Union[str, int, tuple, ChromiumFrame], timeout: float = None) -> ChromiumFrame: ...
|
||||||
|
Loading…
x
Reference in New Issue
Block a user