mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2026-08-28 10:45:03 +00:00
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:
parent
56e328627e
commit
220f9f2e4f
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue