优化ChromiumPage下载逻辑,未完成

This commit is contained in:
g1879 2024-10-15 17:51:45 +08:00
parent b20018072f
commit 463bdaa912
2 changed files with 5 additions and 0 deletions

View File

@ -127,6 +127,8 @@ class Clicker(object):
tmp_save_path = str(Path(save_path).absolute())
else:
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
if rename or suffix:

View File

@ -266,6 +266,9 @@ class ChromiumPageSetter(TabSetter):
super().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):
def __init__(self, owner):