aboutsummaryrefslogtreecommitdiffstats
path: root/yt_dlp/cookies.py
diff options
context:
space:
mode:
authorpukkandan <pukkandan.ytdlp@gmail.com>2023-07-15 11:41:08 +0530
committerpukkandan <pukkandan.ytdlp@gmail.com>2023-07-15 16:18:34 +0530
commit1b392f905d20ef1f1b300b180f867d43c9ce49b8 (patch)
tree06fb8578404d5775e8be103dfef1a111521c2745 /yt_dlp/cookies.py
parent1ba6fe9db5f660d5538588315c23ad6cf0371c5f (diff)
downloadhypervideo-pre-1b392f905d20ef1f1b300b180f867d43c9ce49b8.tar.lz
hypervideo-pre-1b392f905d20ef1f1b300b180f867d43c9ce49b8.tar.xz
hypervideo-pre-1b392f905d20ef1f1b300b180f867d43c9ce49b8.zip
[utils] Add temporary shim for logging
Related: #5680, #7517
Diffstat (limited to 'yt_dlp/cookies.py')
-rw-r--r--yt_dlp/cookies.py23
1 files changed, 4 insertions, 19 deletions
diff --git a/yt_dlp/cookies.py b/yt_dlp/cookies.py
index 53fe0ec2d..16f1918e6 100644
--- a/yt_dlp/cookies.py
+++ b/yt_dlp/cookies.py
@@ -41,30 +41,15 @@ from .utils import (
try_call,
write_string,
)
+from .utils._utils import _YDLLogger
CHROMIUM_BASED_BROWSERS = {'brave', 'chrome', 'chromium', 'edge', 'opera', 'vivaldi'}
SUPPORTED_BROWSERS = CHROMIUM_BASED_BROWSERS | {'firefox', 'safari'}
-class YDLLogger:
- def __init__(self, ydl=None):
- self._ydl = ydl
-
- def debug(self, message):
- if self._ydl:
- self._ydl.write_debug(message)
-
- def info(self, message):
- if self._ydl:
- self._ydl.to_screen(f'[Cookies] {message}')
-
- def warning(self, message, only_once=False):
- if self._ydl:
- self._ydl.report_warning(message, only_once)
-
- def error(self, message):
- if self._ydl:
- self._ydl.report_error(message)
+class YDLLogger(_YDLLogger):
+ def warning(self, message, only_once=False): # compat
+ return super().warning(message, once=only_once)
class ProgressBar(MultilinePrinter):
_DELAY, _timer = 0.1, 0