From 322ee10bd081e8afdf865308bba6c3eb79c98ef0 Mon Sep 17 00:00:00 2001 From: g1879 Date: Mon, 3 Apr 2023 23:45:51 +0800 Subject: [PATCH] =?UTF-8?q?3.2.24=E4=BF=AE=E5=A4=8D=E5=90=8C=E5=9F=9Fifram?= =?UTF-8?q?e=E9=97=AE=E9=A2=98=EF=BC=9B=E6=94=B9=E8=BF=9B=E7=AD=89?= =?UTF-8?q?=E5=BE=85=E6=95=B0=E6=8D=AE=E5=8C=85=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DrissionPage/chromium_base.py | 3 --- DrissionPage/chromium_driver.py | 2 +- requirements.txt | 2 +- setup.py | 2 +- 4 files changed, 3 insertions(+), 6 deletions(-) diff --git a/DrissionPage/chromium_base.py b/DrissionPage/chromium_base.py index 0441132..851584b 100644 --- a/DrissionPage/chromium_base.py +++ b/DrissionPage/chromium_base.py @@ -1197,14 +1197,12 @@ class NetworkListener(object): def _response_received(self, **kwargs): """接收到返回信息时处理方法""" if kwargs['requestId'] in self._requests: - print(f"{kwargs['requestId']} _response_received") self._requests[kwargs['requestId']]['response'] = kwargs['response'] def _loading_finished(self, **kwargs): """请求完成时处理方法""" request_id = kwargs['requestId'] if request_id in self._requests: - print(f'{request_id} _loading_finished') try: body = self._page.run_cdp('Network.getResponseBody', requestId=request_id)['body'] except: @@ -1223,7 +1221,6 @@ class NetworkListener(object): for target in self._targets: if (self._is_regex and search(target, kwargs['request']['url'])) or ( not self._is_regex and target in kwargs['request']['url']): - print(f"{kwargs['requestId']} _requestWillBeSent") self._requests[kwargs['requestId']] = {'target': target, 'post_data': kwargs['request'].get('postData', None), 'request_headers': kwargs['request']['headers']} diff --git a/DrissionPage/chromium_driver.py b/DrissionPage/chromium_driver.py index 9730e72..fbe08e1 100644 --- a/DrissionPage/chromium_driver.py +++ b/DrissionPage/chromium_driver.py @@ -150,7 +150,7 @@ class ChromiumDriver(object): self.event_handlers[event['method']](**event['params']) except Exception as e: raise - raise RuntimeError(f"\n回调函数错误:\n{e}") + # raise RuntimeError(f"\n回调函数错误:\n{e}") self.event_queue.task_done() diff --git a/requirements.txt b/requirements.txt index ea2827c..bd8c135 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,7 +2,7 @@ requests lxml cssselect DownloadKit>=0.5.3 -FlowViewer>=0.2.1 +FlowViewer>=0.2.10 websocket-client click tldextract \ No newline at end of file diff --git a/setup.py b/setup.py index cd75340..fcee54f 100644 --- a/setup.py +++ b/setup.py @@ -23,7 +23,7 @@ setup( 'requests', 'cssselect', 'DownloadKit>=0.5.3', - 'FlowViewer>=0.2.7', + 'FlowViewer>=0.2.10', 'websocket-client', 'click~=8.1.3', 'tldextract'