Properly shim pending HLS subtitle API

Fix https://github.com/ytdl-org/youtube-dl/pull/33285#issuecomment-4753616643, I hope, in a way that won't fail once HLS subtitle support is pushed.

Co-authored-by: dirkf <fieldhouse@gmx.net>
This commit is contained in:
dirkf 2026-06-21 06:17:35 +01:00 committed by GitHub
parent 56e328627e
commit 220f9f2e4f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -19,15 +19,19 @@ from ..utils import (
)
# yt-dlp shim
if not hasattr(InfoExtractor, '_extract_m3u8_formats_and_subtitles'):
class YTDLPShimIE(InfoExtractor):
def _extract_m3u8_formats_and_subtitles(self, *args, **kwargs):
return self._extract_m3u8_formats(*args, **kwargs), {}
InfoExtractor = YTDLPShimIE
class ArteTVBaseIE(InfoExtractor):
_ARTE_LANGUAGES = 'fr|de|en|es|it|pl|ro'
_API_BASE = 'https://api.arte.tv/api/player/v2'
# yt-dlp shims
# def _extract_m3u8_formats_and_subtitles(self, *args, **kwargs):
# return self._extract_m3u8_formats(*args, **kwargs), {}
class ArteTVIE(ArteTVBaseIE):
_VALID_URL = r'''(?x)