X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=youtube_dl%2Fextractor%2Fvlive.py;h=86c1cb5ef5d352608416a653bea5ef9f74c4287a;hb=40ca5b04f4845d3ab334d6cc9fb0272fe25df8b3;hp=6a403cc649e5071c70f8940e90a4c44b5ae08a09;hpb=eba470f2f22389ab32164e4eb39067ceecf900f5;p=youtube-dl diff --git a/youtube_dl/extractor/vlive.py b/youtube_dl/extractor/vlive.py index 6a403cc64..86c1cb5ef 100644 --- a/youtube_dl/extractor/vlive.py +++ b/youtube_dl/extractor/vlive.py @@ -16,6 +16,7 @@ from ..compat import compat_urllib_parse class VLiveIE(InfoExtractor): IE_NAME = 'vlive' + # www.vlive.tv/video/ links redirect to m.vlive.tv/video/ for mobile devices _VALID_URL = r'https?://(?:(www|m)\.)?vlive\.tv/video/(?P[0-9]+)' _TEST = { 'url': 'http://m.vlive.tv/video/1326', @@ -39,8 +40,8 @@ class VLiveIE(InfoExtractor): title = self._og_search_title(webpage) thumbnail = self._og_search_thumbnail(webpage) creator = self._html_search_regex( - r'([^<>]+)', webpage, 'creator') - + r']+class="name">([^<>]+)', webpage, 'creator') + url = 'http://global.apis.naver.com/globalV/globalV/vod/%s/playinfo?' % video_id msgpad = '%.0f' % (time() * 1000) md = b64encode( @@ -51,7 +52,7 @@ class VLiveIE(InfoExtractor): playinfo = self._download_json(url, video_id, 'Downloading video json') if playinfo.get('message', '') != 'success': - raise ExtractorError(playinfo['message']) + raise ExtractorError(playinfo.get('message', 'JSON request unsuccessful')) if not playinfo.get('result'): raise ExtractorError('No videos found.')