]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/extractor/daum.py
[ie/orf:on] Improve extraction (#9677)
[yt-dlp.git] / yt_dlp / extractor / daum.py
index 8aa2af9a8add204004acc7f01400abb43742aca2..24c52085572d2ca7b5a51703e837d5395c0aa326 100644 (file)
@@ -1,7 +1,3 @@
-# coding: utf-8
-
-from __future__ import unicode_literals
-
 import itertools
 
 from .common import InfoExtractor
@@ -31,7 +27,7 @@ class DaumIE(DaumBaseIE):
             'duration': 2117,
             'view_count': int,
             'comment_count': int,
-            'uploader_id': 186139,
+            'uploader_id': '186139',
             'uploader': '콘간지',
             'timestamp': 1387310323,
         },
@@ -48,7 +44,7 @@ class DaumIE(DaumBaseIE):
             'view_count': int,
             'comment_count': int,
             'uploader': 'MBC 예능',
-            'uploader_id': 132251,
+            'uploader_id': '132251',
             'timestamp': 1421604228,
         },
     }, {
@@ -67,7 +63,7 @@ class DaumIE(DaumBaseIE):
             'view_count': int,
             'comment_count': int,
             'uploader': '까칠한 墮落始祖 황비홍님의',
-            'uploader_id': 560824,
+            'uploader_id': '560824',
             'timestamp': 1203770745,
         },
     }, {
@@ -81,7 +77,7 @@ class DaumIE(DaumBaseIE):
             'description': '러블리즈 - Destiny (나의 지구) (Lovelyz - Destiny)\r\n\r\n[쇼! 음악중심] 20160611, 507회',
             'upload_date': '20170129',
             'uploader': '쇼! 음악중심',
-            'uploader_id': 2653210,
+            'uploader_id': '2653210',
             'timestamp': 1485684628,
         },
     }]
@@ -111,7 +107,7 @@ class DaumClipIE(DaumBaseIE):
             'duration': 3868,
             'view_count': int,
             'uploader': 'GOMeXP',
-            'uploader_id': 6667,
+            'uploader_id': '6667',
             'timestamp': 1377911092,
         },
     }, {
@@ -129,7 +125,7 @@ def _real_extract(self, url):
             self._KAKAO_EMBED_BASE + video_id, 'Kakao', video_id)
 
 
-class DaumListIE(InfoExtractor):
+class DaumListIE(InfoExtractor):  # XXX: Conventionally, base classes should end with BaseIE/InfoExtractor
     def _get_entries(self, list_id, list_id_type):
         name = None
         entries = []
@@ -157,11 +153,8 @@ def _check_clip(self, url, list_id):
         query_dict = parse_qs(url)
         if 'clipid' in query_dict:
             clip_id = query_dict['clipid'][0]
-            if self.get_param('noplaylist'):
-                self.to_screen('Downloading just video %s because of --no-playlist' % clip_id)
+            if not self._yes_playlist(list_id, clip_id):
                 return self.url_result(DaumClipIE._URL_TEMPLATE % clip_id, 'DaumClip')
-            else:
-                self.to_screen('Downloading playlist %s - add --no-playlist to just download video' % list_id)
 
 
 class DaumPlaylistIE(DaumListIE):