From 484820f2eef231964f5246cf006be02bc9045bc6 Mon Sep 17 00:00:00 2001 From: starenka Date: Mon, 1 Jul 2019 20:21:03 +0200 Subject: [PATCH 1/2] pass quality argument down the hole --- pyppeteer/page.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pyppeteer/page.py b/pyppeteer/page.py index 5a293f4c..3ef883e5 100644 --- a/pyppeteer/page.py +++ b/pyppeteer/page.py @@ -1259,7 +1259,8 @@ async def _screenshotTask(self, format: str, options: dict # noqa: C901 await self._client.send('Target.activateTarget', { 'targetId': self._target._targetId, }) - clip = options.get('clip') + + clip, quality = options.get('clip'), options.get('quality') if clip: clip['scale'] = 1 @@ -1299,6 +1300,9 @@ async def _screenshotTask(self, format: str, options: dict # noqa: C901 opt = {'format': format} if clip: opt['clip'] = clip + if format == 'jpeg' and quality is not None: + opt['quality'] = quality + result = await self._client.send('Page.captureScreenshot', opt) if options.get('omitBackground'): From 2e1f52b0f182b44b997158d45eec698d27dd6543 Mon Sep 17 00:00:00 2001 From: starenka Date: Thu, 5 Aug 2021 13:47:34 +0200 Subject: [PATCH 2/2] bump chromium version --- pyppeteer/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyppeteer/__init__.py b/pyppeteer/__init__.py index c1e4859c..06bbe01a 100644 --- a/pyppeteer/__init__.py +++ b/pyppeteer/__init__.py @@ -11,7 +11,7 @@ __author__ = """Hiroyuki Takagi""" __email__ = 'miyako.dev@gmail.com' __version__ = '0.0.25' -__chromium_revision__ = '588429' +__chromium_revision__ = '848005' # https://github.com/puppeteer/puppeteer/releases __base_puppeteer_version__ = 'v1.6.0' __pyppeteer_home__ = os.environ.get( 'PYPPETEER_HOME', AppDirs('pyppeteer').user_data_dir) # type: str