mirror of
https://github.com/mikf/gallery-dl.git
synced 2024-11-23 03:02:50 +01:00
[downloader:http] try to import SSL exception class from OpenSSL
(#324)
This commit is contained in:
parent
bc6b0cfddc
commit
8966930c5c
@ -12,10 +12,14 @@ import os
|
||||
import time
|
||||
import mimetypes
|
||||
from requests.exceptions import RequestException, ConnectionError, Timeout
|
||||
from ssl import SSLError
|
||||
from .common import DownloaderBase
|
||||
from .. import text
|
||||
|
||||
try:
|
||||
from OpenSSL.SSL import Error as SSLError
|
||||
except ImportError:
|
||||
from ssl import SSLError
|
||||
|
||||
|
||||
class HttpDownloader(DownloaderBase):
|
||||
scheme = "http"
|
||||
|
Loading…
Reference in New Issue
Block a user