mirror of
https://github.com/blackjack4494/yt-dlc.git
synced 2024-12-25 17:27:36 +00:00
[arte] Add extractor for concert.arte.tv (closes #2588)
This commit is contained in:
parent
f66ede4328
commit
4966a0b22d
2 changed files with 19 additions and 0 deletions
|
@ -10,6 +10,7 @@ from .arte import (
|
||||||
ArteTvIE,
|
ArteTvIE,
|
||||||
ArteTVPlus7IE,
|
ArteTVPlus7IE,
|
||||||
ArteTVCreativeIE,
|
ArteTVCreativeIE,
|
||||||
|
ArteTVConcertIE,
|
||||||
ArteTVFutureIE,
|
ArteTVFutureIE,
|
||||||
ArteTVDDCIE,
|
ArteTVDDCIE,
|
||||||
)
|
)
|
||||||
|
|
|
@ -202,6 +202,8 @@ class ArteTVPlus7IE(InfoExtractor):
|
||||||
re.match(r'VO-ST(F|A)', f.get('versionCode', '')) is None,
|
re.match(r'VO-ST(F|A)', f.get('versionCode', '')) is None,
|
||||||
# The version with sourds/mal subtitles has also lower relevance
|
# The version with sourds/mal subtitles has also lower relevance
|
||||||
re.match(r'VO?(F|A)-STM\1', f.get('versionCode', '')) is None,
|
re.match(r'VO?(F|A)-STM\1', f.get('versionCode', '')) is None,
|
||||||
|
# Prefer http downloads over m3u8
|
||||||
|
0 if f['url'].endswith('m3u8') else 1,
|
||||||
)
|
)
|
||||||
formats = sorted(formats, key=sort_key)
|
formats = sorted(formats, key=sort_key)
|
||||||
def _format(format_info):
|
def _format(format_info):
|
||||||
|
@ -284,3 +286,19 @@ class ArteTVDDCIE(ArteTVPlus7IE):
|
||||||
javascriptPlayerGenerator = self._download_webpage(script_url, video_id, 'Download javascript player generator')
|
javascriptPlayerGenerator = self._download_webpage(script_url, video_id, 'Download javascript player generator')
|
||||||
json_url = self._search_regex(r"json_url=(.*)&rendering_place.*", javascriptPlayerGenerator, 'json url')
|
json_url = self._search_regex(r"json_url=(.*)&rendering_place.*", javascriptPlayerGenerator, 'json url')
|
||||||
return self._extract_from_json_url(json_url, video_id, lang)
|
return self._extract_from_json_url(json_url, video_id, lang)
|
||||||
|
|
||||||
|
|
||||||
|
class ArteTVConcertIE(ArteTVPlus7IE):
|
||||||
|
IE_NAME = 'arte.tv:concert'
|
||||||
|
_VALID_URL = r'https?://concert\.arte\.tv/(?P<lang>de|fr)/(?P<id>.+)'
|
||||||
|
|
||||||
|
_TEST = {
|
||||||
|
'url': 'http://concert.arte.tv/de/notwist-im-pariser-konzertclub-divan-du-monde',
|
||||||
|
'md5': '9ea035b7bd69696b67aa2ccaaa218161',
|
||||||
|
'info_dict': {
|
||||||
|
'id': '186',
|
||||||
|
'ext': 'mp4',
|
||||||
|
'title': 'The Notwist im Pariser Konzertclub "Divan du Monde"',
|
||||||
|
'upload_date': '20140128',
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue