From 67077b182b698ac56cec9525a2669d5cee394226 Mon Sep 17 00:00:00 2001 From: Anton Larionov Date: Sun, 28 Sep 2014 23:36:55 +0400 Subject: [thvideo] Add support for playlists --- youtube_dl/extractor/thvideo.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'youtube_dl/extractor/thvideo.py') diff --git a/youtube_dl/extractor/thvideo.py b/youtube_dl/extractor/thvideo.py index 607e947bb..0ae20ea30 100644 --- a/youtube_dl/extractor/thvideo.py +++ b/youtube_dl/extractor/thvideo.py @@ -57,3 +57,27 @@ class THVideoIE(InfoExtractor): 'description': description, 'upload_date': upload_date } + + +class THVideoPlaylistIE(InfoExtractor): + _VALID_URL = r'http?://(?:www\.)?thvideo\.tv/mylist(?P[0-9]+)' + _TEST = { + 'url': 'http://thvideo.tv/mylist2', + 'info_dict': { + 'id': '2', + 'title': '幻想万華鏡', + }, + 'playlist_mincount': 23, + } + + def _real_extract(self, url): + webpage = self._download_webpage(url, 'playlist') + mobj = re.match(self._VALID_URL, url) + list_id = mobj.group('id') + list_title = self._html_search_regex(r'

(.*?)