Release 2024.03.10
[yt-dlp.git] / yt_dlp / networking / __init__.py
blobacadc0147d597d547325b41166fc1e99221ea60e
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())