From da171e49c94d7998e62388af29e1842816232285 Mon Sep 17 00:00:00 2001 From: g1879 Date: Tue, 15 Oct 2024 23:12:02 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E4=B8=8B=E8=BD=BD=E9=80=BB?= =?UTF-8?q?=E8=BE=91=EF=BC=8C=E6=9C=AA=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DrissionPage/_units/clicker.py | 7 +++++++ MANIFEST.in | 1 + 2 files changed, 8 insertions(+) diff --git a/DrissionPage/_units/clicker.py b/DrissionPage/_units/clicker.py index 83e5e23..0db51e3 100644 --- a/DrissionPage/_units/clicker.py +++ b/DrissionPage/_units/clicker.py @@ -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: diff --git a/MANIFEST.in b/MANIFEST.in index 962ba91..5688ac7 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,4 +1,5 @@ include DrissionPage/_configs/configs.ini +include DrissionPage/_functions/suffixes.dat include DrissionPage/*.pyi include DrissionPage/*/*.py include DrissionPage/*/*.pyi \ No newline at end of file