mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-11-16 15:55:51 +00:00
feat(arte_extractor): add alt_title for regular shows ❯❯❯
Most repeating Arte.tv shows have an essential subtitle (not to confuse with the one already in the extractor!). Without that title those shows get the same title for all potentially hundreds of shows. Here is an example of the German version of the ARTE Reportage show: https://www.arte.tv/de/videos/030273-820-A/arte-reportage/ Now: title is `ARTE Reportage` and no alt_title is available With this: title is `ARTE Reportage` and alt_title is `Sudan: Die Tigray fliehen aus Äthiopien`
This commit is contained in:
parent
a803582717
commit
f861761a90
1 changed files with 14 additions and 1 deletions
|
@ -33,6 +33,16 @@ class ArteTVIE(ArteTVBaseIE):
|
|||
/(?P<id>\d{6}-\d{3}-[AF])
|
||||
''' % {'langs': ArteTVBaseIE._ARTE_LANGUAGES}
|
||||
_TESTS = [{
|
||||
'url': 'https://www.arte.tv/de/videos/092724-001-A/lasst-mich-schlafen/',
|
||||
'info_dict': {
|
||||
'id': '092724-001-A',
|
||||
'ext': 'mp4',
|
||||
'title': 'Lasst mich schlafen!',
|
||||
'alt_title': 'Wie schlafen wir?',
|
||||
'description': 'Gegen Abend signalisiert die biologische Uhr dem Körper durch das Ausschütten von Melatonin, dass es Zeit ist, herunterzufahren. Doch was geschieht dabei im Gehirn? Der Schlafforscher Raphael Heinzer vom Schlafforschungszentrum Lausanne will dies herausfinden und beobachtet die Hirnströme in den verschiedenen Schlafphasen.',
|
||||
'upload_date': '20200224'
|
||||
},
|
||||
}, {
|
||||
'url': 'https://www.arte.tv/en/videos/088501-000-A/mexico-stealing-petrol-to-survive/',
|
||||
'info_dict': {
|
||||
'id': '088501-000-A',
|
||||
|
@ -170,7 +180,7 @@ class ArteTVIE(ArteTVBaseIE):
|
|||
|
||||
self._sort_formats(formats)
|
||||
|
||||
return {
|
||||
extracted_metadata = {
|
||||
'id': player_info.get('VID') or video_id,
|
||||
'title': title,
|
||||
'description': player_info.get('VDE'),
|
||||
|
@ -178,6 +188,9 @@ class ArteTVIE(ArteTVBaseIE):
|
|||
'thumbnail': player_info.get('programImage') or player_info.get('VTU', {}).get('IUR'),
|
||||
'formats': formats,
|
||||
}
|
||||
if player_info.get('subtitle', '').strip():
|
||||
extracted_metadata['alt_title'] = player_info.get('subtitle', '').strip()
|
||||
return extracted_metadata
|
||||
|
||||
|
||||
class ArteTVEmbedIE(InfoExtractor):
|
||||
|
|
Loading…
Reference in a new issue