File tree Expand file tree Collapse file tree 2 files changed +3
-8
lines changed Expand file tree Collapse file tree 2 files changed +3
-8
lines changed Original file line number Diff line number Diff line change 1111from pathlib import Path
1212from zipfile import ZipFile
1313
14+ import certifi
1415import urllib3
1516from pyppeteer import __chromium_revision__ , __pyppeteer_home__
1617from tqdm import tqdm
@@ -68,14 +69,7 @@ def download_zip(url: str) -> BytesIO:
6869 """Download data from url."""
6970 logger .warning ('Starting Chromium download. ' 'Download may take a few minutes.' )
7071
71- # Uncomment the statement below to disable HTTPS warnings and allow
72- # download without certificate verification. This is *strongly* as it
73- # opens the code to man-in-the-middle (and other) vulnerabilities; see
74- # https://urllib3.readthedocs.io/en/latest/advanced-usage.html#tls-warnings
75- # for more.
76- # urllib3.disable_warnings()
77-
78- with urllib3 .PoolManager () as http :
72+ with urllib3 .PoolManager (cert_reqs = 'CERT_REQUIRED' , ca_certs = certifi .where ()) as http :
7973 # Get data from url.
8074 # set preload_content=False means using stream later.
8175 r = http .request ('GET' , url , preload_content = False )
Original file line number Diff line number Diff line change @@ -51,6 +51,7 @@ pyee = "^8.1.0"
5151tqdm = " ^4.42.1"
5252urllib3 = " ^1.25.8"
5353websockets = " ^9.1"
54+ certifi = " >=2021"
5455
5556[tool .poetry .dev-dependencies ]
5657tox = " ^3.20.1"
You can’t perform that action at this time.
0 commit comments