mirror of
https://gitee.com/g1879/DrissionPage.git
synced 2024-12-10 04:00:23 +08:00
优化ChromiumPage下载逻辑,未完成
This commit is contained in:
parent
b20018072f
commit
463bdaa912
@ -127,6 +127,8 @@ class Clicker(object):
|
|||||||
tmp_save_path = str(Path(save_path).absolute())
|
tmp_save_path = str(Path(save_path).absolute())
|
||||||
else:
|
else:
|
||||||
self._ele.tab.set.download_path(save_path)
|
self._ele.tab.set.download_path(save_path)
|
||||||
|
elif new_tab:
|
||||||
|
tmp_save_path = self._ele.owner._tab.download_path
|
||||||
|
|
||||||
obj = self._ele.tab._browser if new_tab else self._ele.owner._tab
|
obj = self._ele.tab._browser if new_tab else self._ele.owner._tab
|
||||||
if rename or suffix:
|
if rename or suffix:
|
||||||
|
@ -266,6 +266,9 @@ class ChromiumPageSetter(TabSetter):
|
|||||||
super().download_path(path)
|
super().download_path(path)
|
||||||
self._owner.browser.set.download_path(path)
|
self._owner.browser.set.download_path(path)
|
||||||
|
|
||||||
|
def download_file_name(self, name=None, suffix=None):
|
||||||
|
self._owner.browser.set.download_file_name(name, suffix)
|
||||||
|
|
||||||
|
|
||||||
class WebPageSetter(ChromiumPageSetter):
|
class WebPageSetter(ChromiumPageSetter):
|
||||||
def __init__(self, owner):
|
def __init__(self, owner):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user