From f7368c64e54ba66f9ad59338b5d2df1d3ca2cee9 Mon Sep 17 00:00:00 2001 From: g1879 Date: Wed, 30 Aug 2023 20:23:34 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=85=83=E7=B4=A0=E6=88=AA?= =?UTF-8?q?=E5=9B=BE=E6=97=B6=E7=AA=97=E5=8F=A3=E5=A4=96=E9=83=A8=E5=88=86?= =?UTF-8?q?=E7=A9=BA=E7=99=BD=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DrissionPage/chromium_base.py | 2 +- DrissionPage/chromium_element.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/DrissionPage/chromium_base.py b/DrissionPage/chromium_base.py index 0264207..c2c9400 100644 --- a/DrissionPage/chromium_base.py +++ b/DrissionPage/chromium_base.py @@ -904,7 +904,7 @@ class ChromiumBase(BasePage): h = right_bottom[1] - y vp = {'x': x, 'y': y, 'width': w, 'height': h, 'scale': 1} png = self.run_cdp_loaded('Page.captureScreenshot', format=pic_type, - captureBeyondViewport=False, clip=vp)['data'] + captureBeyondViewport=True, clip=vp)['data'] else: png = self.run_cdp_loaded('Page.captureScreenshot', format=pic_type)['data'] diff --git a/DrissionPage/chromium_element.py b/DrissionPage/chromium_element.py index afcb6d4..10ac389 100644 --- a/DrissionPage/chromium_element.py +++ b/DrissionPage/chromium_element.py @@ -518,8 +518,8 @@ class ChromiumElement(DrissionElement): while not self.run_js(js) and perf_counter() < end_time: sleep(.1) - self.scroll.to_see(center=True) - sleep(1) + # self.scroll.to_see(center=True) + # sleep(1) left, top = self.location width, height = self.size left_top = (left, top)