]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/extractor/npo.py
[extractor] Standardize `_live_title`
[yt-dlp.git] / yt_dlp / extractor / npo.py
index ca6dbfc817ce0b8b9a2846da81426945f4a5cb6e..a8aaef6f16f739c97df0091d8749a77561273239 100644 (file)
@@ -246,9 +246,8 @@ def _get_info(self, url, video_id):
                 })
 
         if not formats:
-            if not self._downloader.params.get('allow_unplayable_formats') and drm:
-                raise ExtractorError('This video is DRM protected.', expected=True)
-            return
+            if not self.get_param('allow_unplayable_formats') and drm:
+                self.report_drm(video_id)
 
         self._sort_formats(formats)
 
@@ -468,7 +467,7 @@ def add_format_url(format_url):
 
         return {
             'id': video_id,
-            'title': self._live_title(title) if is_live else title,
+            'title': title,
             'description': metadata.get('info'),
             'thumbnail': metadata.get('images', [{'url': None}])[-1]['url'],
             'upload_date': unified_strdate(metadata.get('gidsdatum')),
@@ -562,7 +561,7 @@ def _real_extract(self, url):
         return {
             'id': video_id,
             'url': stream['url'],
-            'title': self._live_title(title),
+            'title': title,
             'acodec': codec,
             'ext': codec,
             'is_live': True,