3.0.10修复连接浏览器时可能出现的异常

This commit is contained in:
g1879 2022-11-24 17:11:45 +08:00
parent 066e2a8056
commit bf695db16b
2 changed files with 4 additions and 4 deletions

View File

@ -10,7 +10,7 @@ from platform import system
from re import split, search, sub from re import split, search, sub
from shutil import rmtree from shutil import rmtree
from subprocess import Popen from subprocess import Popen
from time import perf_counter from time import perf_counter, sleep
from typing import Union from typing import Union
from zipfile import ZipFile from zipfile import ZipFile
from urllib.parse import urlparse, urljoin, urlunparse from urllib.parse import urlparse, urljoin, urlunparse
@ -578,8 +578,8 @@ def _run_browser(port, path: str, args) -> Popen:
for tab in tabs: for tab in tabs:
if tab['type'] == 'page': if tab['type'] == 'page':
return debugger return debugger
except requests_connection_err: except Exception:
pass sleep(.2)
raise ConnectionError('无法连接浏览器。') raise ConnectionError('无法连接浏览器。')

View File

@ -6,7 +6,7 @@ with open("README.md", "r", encoding='utf-8') as fh:
setup( setup(
name="DrissionPage", name="DrissionPage",
version="3.0.9", version="3.0.10",
author="g1879", author="g1879",
author_email="g1879@qq.com", author_email="g1879@qq.com",
description="A module that integrates selenium and requests session, encapsulates common page operations.", description="A module that integrates selenium and requests session, encapsulates common page operations.",