]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/extractor/ccc.py
[ie/crunchyroll] Fix stream extraction (#10005)
[yt-dlp.git] / yt_dlp / extractor / ccc.py
index 36e6dff72c9f4bf62b59b864091a7b3a0d17ba5b..ca6b82c981c56295ed726581ab36caf5b5487a86 100644 (file)
@@ -1,6 +1,3 @@
-# coding: utf-8
-from __future__ import unicode_literals
-
 from .common import InfoExtractor
 from ..utils import (
     int_or_none,
@@ -67,7 +64,6 @@ def _real_extract(self, url):
                 'language': language,
                 'vcodec': vcodec,
             })
-        self._sort_formats(formats)
 
         return {
             'id': event_id,
@@ -78,6 +74,7 @@ def _real_extract(self, url):
             'thumbnail': event_data.get('thumb_url'),
             'timestamp': parse_iso8601(event_data.get('date')),
             'duration': int_or_none(event_data.get('length')),
+            'view_count': int_or_none(event_data.get('view_count')),
             'tags': event_data.get('tags'),
             'formats': formats,
         }
@@ -93,10 +90,17 @@ class CCCPlaylistIE(InfoExtractor):
             'id': '30c3',
         },
         'playlist_count': 135,
+    }, {
+        'url': 'https://media.ccc.de/c/DS2023',
+        'info_dict': {
+            'title': 'Datenspuren 2023',
+            'id': 'DS2023',
+        },
+        'playlist_count': 37
     }]
 
     def _real_extract(self, url):
-        playlist_id = self._match_id(url).lower()
+        playlist_id = self._match_id(url)
 
         conf = self._download_json(
             'https://media.ccc.de/public/conferences/' + playlist_id,