]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/extractor/deezer.py
[ie/crunchyroll] Fix stream extraction (#10005)
[yt-dlp.git] / yt_dlp / extractor / deezer.py
index 3b1833c8d92a6bfc491f0c41b030788582c49107..f61f12af02b20c4c9051e712506649950adb4e2f 100644 (file)
@@ -1,7 +1,4 @@
-from __future__ import unicode_literals
-
 import json
-import re
 
 from .common import InfoExtractor
 from ..utils import (
 
 class DeezerBaseInfoExtractor(InfoExtractor):
     def get_data(self, url):
-        if not self._downloader.params.get('test'):
+        if not self.get_param('test'):
             self.report_warning('For now, this extractor only supports the 30 second previews. Patches welcome!')
 
-        mobj = re.match(self._VALID_URL, url)
+        mobj = self._match_valid_url(url)
         data_id = mobj.group('id')
 
         webpage = self._download_webpage(url, data_id)
@@ -65,7 +62,6 @@ def _real_extract(self, url):
                 'preference': -100,  # Only the first 30 seconds
                 'ext': 'mp3',
             }]
-            self._sort_formats(formats)
             artists = ', '.join(
                 orderedSet(a.get('ART_NAME') for a in s.get('ARTISTS')))
             entries.append({
@@ -118,7 +114,6 @@ def _real_extract(self, url):
                 'preference': -100,  # Only the first 30 seconds
                 'ext': 'mp3',
             }]
-            self._sort_formats(formats)
             artists = ', '.join(
                 orderedSet(a.get('ART_NAME') for a in s.get('ARTISTS')))
             entries.append({