调整下载逻辑,未完成

This commit is contained in:
g1879 2024-10-15 23:12:02 +08:00
parent 463bdaa912
commit da171e49c9
2 changed files with 8 additions and 0 deletions

View File

@ -10,6 +10,7 @@ from time import perf_counter, sleep
from .._functions.settings import Settings
from .._functions.web import offset_scroll
from .._units.downloader import TabDownloadSettings
from ..errors import CanNotClickError, CDPError, NoRectError, AlertExistsError
@ -129,6 +130,12 @@ class Clicker(object):
self._ele.tab.set.download_path(save_path)
elif new_tab:
tmp_save_path = self._ele.owner._tab.download_path
t_settings = TabDownloadSettings(self._ele.owner.tab_id)
b_settings = TabDownloadSettings('browser')
b_settings.rename = t_settings.rename
b_settings.suffix = t_settings.suffix
t_settings.rename = None
t_settings.suffix = None
obj = self._ele.tab._browser if new_tab else self._ele.owner._tab
if rename or suffix:

View File

@ -1,4 +1,5 @@
include DrissionPage/_configs/configs.ini
include DrissionPage/_functions/suffixes.dat
include DrissionPage/*.pyi
include DrissionPage/*/*.py
include DrissionPage/*/*.pyi