summaryrefslogtreecommitdiffstats
path: root/yt_dlp/extractor/daum.py
diff options
context:
space:
mode:
Diffstat (limited to 'yt_dlp/extractor/daum.py')
-rw-r--r--yt_dlp/extractor/daum.py28
1 files changed, 13 insertions, 15 deletions
diff --git a/yt_dlp/extractor/daum.py b/yt_dlp/extractor/daum.py
index 24c5208..ee84449 100644
--- a/yt_dlp/extractor/daum.py
+++ b/yt_dlp/extractor/daum.py
@@ -1,9 +1,7 @@
import itertools
+import urllib.parse
from .common import InfoExtractor
-from ..compat import (
- compat_urllib_parse_unquote,
-)
from ..utils import parse_qs
@@ -83,7 +81,7 @@ class DaumIE(DaumBaseIE):
}]
def _real_extract(self, url):
- video_id = compat_urllib_parse_unquote(self._match_id(url))
+ video_id = urllib.parse.unquote(self._match_id(url))
if not video_id.isdigit():
video_id += '@my'
return self.url_result(
@@ -117,7 +115,7 @@ class DaumClipIE(DaumBaseIE):
@classmethod
def suitable(cls, url):
- return False if DaumPlaylistIE.suitable(url) or DaumUserIE.suitable(url) else super(DaumClipIE, cls).suitable(url)
+ return False if DaumPlaylistIE.suitable(url) or DaumUserIE.suitable(url) else super().suitable(url)
def _real_extract(self, url):
video_id = self._match_id(url)
@@ -131,12 +129,12 @@ class DaumListIE(InfoExtractor): # XXX: Conventionally, base classes should end
entries = []
for pagenum in itertools.count(1):
list_info = self._download_json(
- 'http://tvpot.daum.net/mypot/json/GetClipInfo.do?size=48&init=true&order=date&page=%d&%s=%s' % (
- pagenum, list_id_type, list_id), list_id, 'Downloading list info - %s' % pagenum)
+ f'http://tvpot.daum.net/mypot/json/GetClipInfo.do?size=48&init=true&order=date&page={pagenum}&{list_id_type}={list_id}',
+ list_id, f'Downloading list info - {pagenum}')
entries.extend([
self.url_result(
- 'http://tvpot.daum.net/v/%s' % clip['vid'])
+ 'http://tvpot.daum.net/v/{}'.format(clip['vid']))
for clip in list_info['clip_list']
])
@@ -169,7 +167,7 @@ class DaumPlaylistIE(DaumListIE):
'id': '6213966',
'title': 'Woorissica Official',
},
- 'playlist_mincount': 181
+ 'playlist_mincount': 181,
}, {
'note': 'Playlist url with clipid - noplaylist',
'url': 'http://tvpot.daum.net/mypot/View.do?playlistid=6213966&clipid=73806844',
@@ -182,12 +180,12 @@ class DaumPlaylistIE(DaumListIE):
'params': {
'noplaylist': True,
'skip_download': True,
- }
+ },
}]
@classmethod
def suitable(cls, url):
- return False if DaumUserIE.suitable(url) else super(DaumPlaylistIE, cls).suitable(url)
+ return False if DaumUserIE.suitable(url) else super().suitable(url)
def _real_extract(self, url):
list_id = self._match_id(url)
@@ -211,7 +209,7 @@ class DaumUserIE(DaumListIE):
'id': 'o2scDLIVbHc0',
'title': '마이 리틀 텔레비전',
},
- 'playlist_mincount': 213
+ 'playlist_mincount': 213,
}, {
'url': 'http://tvpot.daum.net/mypot/View.do?ownerid=o2scDLIVbHc0&clipid=73801156',
'info_dict': {
@@ -219,12 +217,12 @@ class DaumUserIE(DaumListIE):
'ext': 'mp4',
'title': '[미공개] 김구라, 오만석이 부릅니다 \'오케피\' - 마이 리틀 텔레비전 20160116',
'upload_date': '20160117',
- 'description': 'md5:5e91d2d6747f53575badd24bd62b9f36'
+ 'description': 'md5:5e91d2d6747f53575badd24bd62b9f36',
},
'params': {
'noplaylist': True,
'skip_download': True,
- }
+ },
}, {
'note': 'Playlist url has ownerid and playlistid, playlistid takes precedence',
'url': 'http://tvpot.daum.net/mypot/View.do?ownerid=o2scDLIVbHc0&playlistid=6196631',
@@ -232,7 +230,7 @@ class DaumUserIE(DaumListIE):
'id': '6196631',
'title': '마이 리틀 텔레비전 - 20160109',
},
- 'playlist_count': 11
+ 'playlist_count': 11,
}, {
'url': 'http://tvpot.daum.net/mypot/Top.do?ownerid=o2scDLIVbHc0',
'only_matching': True,