1
0
Fork 0
mirror of https://github.com/ytdl-org/youtube-dl.git synced 2024-12-23 01:08:10 +00:00

Merge remote-tracking branch 'diffycat/thvideo-update'

This commit is contained in:
Philipp Hagemeister 2014-09-29 00:36:55 +02:00
commit 457ac58cc7
2 changed files with 28 additions and 1 deletions

View file

@ -371,7 +371,10 @@ from .thisav import ThisAVIE
from .tinypic import TinyPicIE from .tinypic import TinyPicIE
from .tlc import TlcIE, TlcDeIE from .tlc import TlcIE, TlcDeIE
from .tnaflix import TNAFlixIE from .tnaflix import TNAFlixIE
from .thvideo import THVideoIE from .thvideo import (
THVideoIE,
THVideoPlaylistIE
)
from .toutv import TouTvIE from .toutv import TouTvIE
from .toypics import ToypicsUserIE, ToypicsIE from .toypics import ToypicsUserIE, ToypicsIE
from .traileraddict import TrailerAddictIE from .traileraddict import TrailerAddictIE

View file

@ -57,3 +57,27 @@ class THVideoIE(InfoExtractor):
'description': description, 'description': description,
'upload_date': upload_date 'upload_date': upload_date
} }
class THVideoPlaylistIE(InfoExtractor):
_VALID_URL = r'http?://(?:www\.)?thvideo\.tv/mylist(?P<id>[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'<h1 class="show_title">(.*?)<b id', webpage, 'playlist title')
entries = [
self.url_result('http://thvideo.tv/v/th' + id, 'THVideo')
for id in re.findall(r'<dd><a href="http://thvideo.tv/v/th(\d+)/" target=', webpage)]
return self.playlist_result(entries, list_id, list_title)