[ie/soundcloud] Various fixes (#11820)
[yt-dlp.git] / yt_dlp / networking / __init__.py
blob1eaa0ee5fd974393729b88394b4e1eca6131c7a0
1 # flake8: noqa: F401
2 import warnings
4 from .common import (
5 HEADRequest,
6 PUTRequest,
7 Request,
8 RequestDirector,
9 RequestHandler,
10 Response,
13 # isort: split
14 # TODO: all request handlers should be safely imported
15 from . import _urllib
16 from ..utils import bug_reports_message
18 try:
19 from . import _requests
20 except ImportError:
21 pass
22 except Exception as e:
23 warnings.warn(f'Failed to import "requests" request handler: {e}' + bug_reports_message())
25 try:
26 from . import _websockets
27 except ImportError:
28 pass
29 except Exception as e:
30 warnings.warn(f'Failed to import "websockets" request handler: {e}' + bug_reports_message())
32 try:
33 from . import _curlcffi
34 except ImportError:
35 pass
36 except Exception as e:
37 warnings.warn(f'Failed to import "curl_cffi" request handler: {e}' + bug_reports_message())