diff options
author | garret <garret@airmail.cc> | 2023-05-08 17:36:25 +0100 |
---|---|---|
committer | garret <garret@airmail.cc> | 2023-05-08 17:36:56 +0100 |
commit | 9fa2b91f0bde316166413593bb8d6ef0e319587d (patch) | |
tree | 885c3cadfcc667810bbda7f16fda5d2a23d23569 | |
parent | 88dabf2506d5d5421fe2223c6a561d4c9adcafff (diff) | |
download | yt-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)
-rwxr-xr-x | yt_dlp_plugins/extractor/radiko.py | 6 |
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', |