summaryrefslogtreecommitdiffstats
path: root/yt_dlp/networking/__init__.py
blob: 356712c761ae3512b7a9f29b16132cf0fdb14ff8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# flake8: noqa: F401
import warnings

from .common import (
    HEADRequest,
    PUTRequest,
    Request,
    RequestDirector,
    RequestHandler,
    Response,
)

# isort: split
# TODO: all request handlers should be safely imported
from . import _urllib
from ..utils import bug_reports_message

try:
    from . import _requests
except ImportError:
    pass
except Exception as e:
    warnings.warn(f'Failed to import "requests" request handler: {e}' + bug_reports_message())

try:
    from . import _websockets
except ImportError:
    pass
except Exception as e:
    warnings.warn(f'Failed to import "websockets" request handler: {e}' + bug_reports_message())

try:
    from . import _curlcffi  # noqa: F401
except ImportError:
    pass
except Exception as e:
    warnings.warn(f'Failed to import "curl_cffi" request handler: {e}' + bug_reports_message())