aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/yt_dlp_plugins/extractor/radiko.py
diff options
context:
space:
mode:
authorgarret <garret@airmail.cc>2023-05-08 17:36:25 +0100
committergarret <garret@airmail.cc>2023-05-08 17:36:56 +0100
commit9fa2b91f0bde316166413593bb8d6ef0e319587d (patch)
tree885c3cadfcc667810bbda7f16fda5d2a23d23569 /yt_dlp_plugins/extractor/radiko.py
parent88dabf2506d5d5421fe2223c6a561d4c9adcafff (diff)
downloadyt-dlp-rajiko-9fa2b91f0bde316166413593bb8d6ef0e319587d.tar.gz
yt-dlp-rajiko-9fa2b91f0bde316166413593bb8d6ef0e319587d.tar.bz2
yt-dlp-rajiko-9fa2b91f0bde316166413593bb8d6ef0e319587d.zip
make BaseIE private
prevents the plugin thing from trying to load it as an extractor error this prevents: Traceback (most recent call last): File "/home/g/Downloads/yt-dlp/test/test_download.py", line 160, in test_template res_dict = ydl.extract_info( File "/home/g/Downloads/yt-dlp/yt_dlp/YoutubeDL.py", line 1508, in extract_info if not ie.suitable(url): File "/home/g/Downloads/yt-dlp/yt_dlp/extractor/common.py", line 563, in suitable return cls._match_valid_url(url) is not None File "/home/g/Downloads/yt-dlp/yt_dlp/extractor/common.py", line 555, in _match_valid_url cls._VALID_URL_RE = re.compile(cls._VALID_URL) File "/usr/lib/python3.10/re.py", line 251, in compile return _compile(pattern, flags) File "/usr/lib/python3.10/re.py", line 302, in _compile raise TypeError("first argument must be string or compiled pattern") TypeError: first argument must be string or compiled pattern (BaseIE doesnt have _VALID_URL, so it fails. If I add one, it wants a _real_extract)
Diffstat (limited to 'yt_dlp_plugins/extractor/radiko.py')
-rwxr-xr-xyt_dlp_plugins/extractor/radiko.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/yt_dlp_plugins/extractor/radiko.py b/yt_dlp_plugins/extractor/radiko.py
index 103bd64..863c9aa 100755
--- a/yt_dlp_plugins/extractor/radiko.py
+++ b/yt_dlp_plugins/extractor/radiko.py
@@ -15,7 +15,7 @@ from yt_dlp.utils import (
)
-class RadikoBaseIE(InfoExtractor):
+class _RadikoBaseIE(InfoExtractor):
_FULL_KEY = base64.b64decode('''
fAu/s1ySbQBAyfugPCOniGTrMcOu5XqKcup3tmrZUAvx3MGtIIZl7wHokm07yxzL/oR9jdgWhi+e
WYVoBIiAG4hDOP5H0Og3Qtd9KFnW8s0N4vNN2DzQ1Y4PqDq3HsQszf4ZaDTkyt4FFW9fPqKUtnVR
@@ -541,7 +541,7 @@ class RadikoBaseIE(InfoExtractor):
)
return formats
-class RadikoLiveIE(RadikoBaseIE):
+class RadikoLiveIE(_RadikoBaseIE):
_VALID_URL = r'https?://(?:www\.)?radiko\.jp/#!/live/(?P<id>[A-Z0-9-]+)'
_TESTS = [{
# JP13 (Tokyo)
@@ -607,7 +607,7 @@ class RadikoLiveIE(RadikoBaseIE):
}
-class RadikoTimeFreeIE(RadikoBaseIE):
+class RadikoTimeFreeIE(_RadikoBaseIE):
_VALID_URL = r'https?://(?:www\.)?radiko\.jp/#!/ts/(?P<station>[A-Z0-9-]+)/(?P<id>\d+)'
_TESTS = [{
'url': 'https://radiko.jp/#!/ts/INT/20230505230000',