diff options
Diffstat (limited to 'yt_dlp/networking/__init__.py')
-rw-r--r-- | yt_dlp/networking/__init__.py | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/yt_dlp/networking/__init__.py b/yt_dlp/networking/__init__.py new file mode 100644 index 0000000..acadc01 --- /dev/null +++ b/yt_dlp/networking/__init__.py @@ -0,0 +1,30 @@ +# 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()) |