]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/extractor/voicy.py
[ie/youtube] Extract upload timestamp if available (#9856)
[yt-dlp.git] / yt_dlp / extractor / voicy.py
index 37c7d5685fe155eb15dc42c645f3cc7f6cb3538f..9ab97688a2670d283c3eb679229566fac0ff1b13 100644 (file)
@@ -1,5 +1,4 @@
-# coding: utf-8
-from __future__ import unicode_literals
+import itertools
 
 from .common import InfoExtractor
 from ..compat import compat_str
@@ -12,8 +11,6 @@
     unsmuggle_url,
 )
 
-import itertools
-
 
 class VoicyBaseIE(InfoExtractor):
     def _extract_from_playlist_data(self, value):
@@ -47,7 +44,6 @@ def _extract_single_article(self, entry):
             'acodec': 'mp3',
             'vcodec': 'none',
         }]
-        self._sort_formats(formats)
         return {
             'id': compat_str(entry.get('ArticleId')),
             'title': entry.get('ArticleTitle'),
@@ -66,6 +62,7 @@ def _call_api(self, url, video_id, **kwargs):
 
 
 class VoicyIE(VoicyBaseIE):
+    _WORKING = False
     IE_NAME = 'voicy'
     _VALID_URL = r'https?://voicy\.jp/channel/(?P<channel_id>\d+)/(?P<id>\d+)'
     ARTICLE_LIST_API_URL = 'https://vmw.api.voicy.jp/articles_list?channel_id=%s&pid=%s'
@@ -92,6 +89,7 @@ def _real_extract(self, url):
 
 
 class VoicyChannelIE(VoicyBaseIE):
+    _WORKING = False
     IE_NAME = 'voicy:channel'
     _VALID_URL = r'https?://voicy\.jp/channel/(?P<id>\d+)'
     PROGRAM_LIST_API_URL = 'https://vmw.api.voicy.jp/program_list/all?channel_id=%s&limit=20&public_type=3%s'
@@ -108,7 +106,7 @@ class VoicyChannelIE(VoicyBaseIE):
 
     @classmethod
     def suitable(cls, url):
-        return not VoicyIE.suitable(url) and super(VoicyChannelIE, cls).suitable(url)
+        return not VoicyIE.suitable(url) and super().suitable(url)
 
     def _entries(self, channel_id):
         pager = ''