]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/extractor/dlive.py
[ie/crunchyroll] Fix stream extraction (#10005)
[yt-dlp.git] / yt_dlp / extractor / dlive.py
index d95c67a5be529c05b723011017561aee21a3927c..30fcf9fceff381c7a8d870d9ed10ece4625515db 100644 (file)
@@ -1,7 +1,4 @@
-from __future__ import unicode_literals
-
 import json
-import re
 
 from .common import InfoExtractor
 from ..utils import int_or_none
@@ -26,7 +23,7 @@ class DLiveVODIE(InfoExtractor):
     }]
 
     def _real_extract(self, url):
-        uploader_id, vod_id = re.match(self._VALID_URL, url).groups()
+        uploader_id, vod_id = self._match_valid_url(url).groups()
         broadcast = self._download_json(
             'https://graphigo.prd.dlive.tv/', vod_id,
             data=json.dumps({'query': '''query {
@@ -43,7 +40,6 @@ def _real_extract(self, url):
         title = broadcast['title']
         formats = self._extract_m3u8_formats(
             broadcast['playbackUrl'], vod_id, 'mp4', 'm3u8_native')
-        self._sort_formats(formats)
         return {
             'id': vod_id,
             'title': title,
@@ -82,10 +78,9 @@ def _real_extract(self, url):
         formats = self._extract_m3u8_formats(
             'https://live.prd.dlive.tv/hls/live/%s.m3u8' % username,
             display_name, 'mp4')
-        self._sort_formats(formats)
         return {
             'id': display_name,
-            'title': self._live_title(title),
+            'title': title,
             'uploader': display_name,
             'uploader_id': username,
             'formats': formats,