From bf695db16b1e3e1f8512ccfc771992bc31fca6d3 Mon Sep 17 00:00:00 2001 From: g1879 Date: Thu, 24 Nov 2022 17:11:45 +0800 Subject: [PATCH] =?UTF-8?q?3.0.10=E4=BF=AE=E5=A4=8D=E8=BF=9E=E6=8E=A5?= =?UTF-8?q?=E6=B5=8F=E8=A7=88=E5=99=A8=E6=97=B6=E5=8F=AF=E8=83=BD=E5=87=BA?= =?UTF-8?q?=E7=8E=B0=E7=9A=84=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DrissionPage/common.py | 6 +++--- setup.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/DrissionPage/common.py b/DrissionPage/common.py index 74d00be..28ec24b 100644 --- a/DrissionPage/common.py +++ b/DrissionPage/common.py @@ -10,7 +10,7 @@ from platform import system from re import split, search, sub from shutil import rmtree from subprocess import Popen -from time import perf_counter +from time import perf_counter, sleep from typing import Union from zipfile import ZipFile from urllib.parse import urlparse, urljoin, urlunparse @@ -578,8 +578,8 @@ def _run_browser(port, path: str, args) -> Popen: for tab in tabs: if tab['type'] == 'page': return debugger - except requests_connection_err: - pass + except Exception: + sleep(.2) raise ConnectionError('无法连接浏览器。') diff --git a/setup.py b/setup.py index 5c846b2..22e624a 100644 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ with open("README.md", "r", encoding='utf-8') as fh: setup( name="DrissionPage", - version="3.0.9", + version="3.0.10", author="g1879", author_email="g1879@qq.com", description="A module that integrates selenium and requests session, encapsulates common page operations.",