From 5ba761eb854d6e415b3ab542293cb31c073dc0f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergey=20M=E2=80=A4?= Date: Fri, 17 Jul 2015 00:39:22 +0600 Subject: [PATCH] [npo] Prefer aflevering_titel over titel --- youtube_dl/extractor/npo.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/youtube_dl/extractor/npo.py b/youtube_dl/extractor/npo.py index 28d5c90b3..91adb23f0 100644 --- a/youtube_dl/extractor/npo.py +++ b/youtube_dl/extractor/npo.py @@ -234,7 +234,9 @@ def _get_info(self, video_id): return { 'id': video_id, - 'title': metadata['titel'], + # prefer aflevering_titel if any since titel may be too generic, e.g. + # http://tegenlicht.vpro.nl/afleveringen/2014-2015/access-to-africa.html + 'title': metadata.get('aflevering_titel') or metadata['titel'], 'description': metadata['info'], 'thumbnail': metadata.get('images', [{'url': None}])[-1]['url'], 'upload_date': unified_strdate(metadata.get('gidsdatum')), @@ -414,7 +416,7 @@ class VPROIE(NPOIE): 'info_dict': { 'id': 'VPWON_1169289', 'ext': 'm4v', - 'title': 'Tegenlicht', + 'title': 'De toekomst komt uit Afrika', 'description': 'md5:52cf4eefbc96fffcbdc06d024147abea', 'upload_date': '20130225', },