summaryrefslogtreecommitdiffstats
path: root/gallery_dl/downloader/http.py
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@unit193.net>2024-02-20 02:31:10 -0500
committerLibravatarUnit 193 <unit193@unit193.net>2024-02-20 02:31:10 -0500
commit01166fa52707cc282467427cf0e65c1b8983c4be (patch)
tree7f61e0de7e76a7a226bb6e05e4e3d181e11f673a /gallery_dl/downloader/http.py
parent12e23f1195164dcb740d6d4a4287e762c9e5e534 (diff)
New upstream version 1.26.8.upstream/1.26.8
Diffstat (limited to 'gallery_dl/downloader/http.py')
-rw-r--r--gallery_dl/downloader/http.py11
1 files changed, 3 insertions, 8 deletions
diff --git a/gallery_dl/downloader/http.py b/gallery_dl/downloader/http.py
index f493947..f1d2c4a 100644
--- a/gallery_dl/downloader/http.py
+++ b/gallery_dl/downloader/http.py
@@ -13,12 +13,7 @@ import mimetypes
from requests.exceptions import RequestException, ConnectionError, Timeout
from .common import DownloaderBase
from .. import text, util
-
from ssl import SSLError
-try:
- from OpenSSL.SSL import Error as OpenSSLError
-except ImportError:
- OpenSSLError = SSLError
class HttpDownloader(DownloaderBase):
@@ -249,7 +244,7 @@ class HttpDownloader(DownloaderBase):
file_header = next(
content if response.raw.chunked
else response.iter_content(16), b"")
- except (RequestException, SSLError, OpenSSLError) as exc:
+ except (RequestException, SSLError) as exc:
msg = str(exc)
print()
continue
@@ -283,7 +278,7 @@ class HttpDownloader(DownloaderBase):
self.out.start(pathfmt.path)
try:
self.receive(fp, content, size, offset)
- except (RequestException, SSLError, OpenSSLError) as exc:
+ except (RequestException, SSLError) as exc:
msg = str(exc)
print()
continue
@@ -310,7 +305,7 @@ class HttpDownloader(DownloaderBase):
try:
for _ in response.iter_content(self.chunk_size):
pass
- except (RequestException, SSLError, OpenSSLError) as exc:
+ except (RequestException, SSLError) as exc:
print()
self.log.debug(
"Unable to consume response body (%s: %s); "