1
0
Fork 0
mirror of https://github.com/ytdl-org/youtube-dl.git synced 2024-11-26 04:02:11 +00:00

[vlive] Fixes for review

This commit is contained in:
ping 2015-08-31 12:46:28 +08:00
parent eba470f2f2
commit 615f155a3a

View file

@ -39,7 +39,7 @@ class VLiveIE(InfoExtractor):
title = self._og_search_title(webpage) title = self._og_search_title(webpage)
thumbnail = self._og_search_thumbnail(webpage) thumbnail = self._og_search_thumbnail(webpage)
creator = self._html_search_regex( creator = self._html_search_regex(
r'<span class="name">([^<>]+)</span>', webpage, 'creator') r'<span[^>]+class="name">([^<>]+)</span>', webpage, 'creator')
url = 'http://global.apis.naver.com/globalV/globalV/vod/%s/playinfo?' % video_id url = 'http://global.apis.naver.com/globalV/globalV/vod/%s/playinfo?' % video_id
msgpad = '%.0f' % (time() * 1000) msgpad = '%.0f' % (time() * 1000)
@ -51,7 +51,7 @@ class VLiveIE(InfoExtractor):
playinfo = self._download_json(url, video_id, 'Downloading video json') playinfo = self._download_json(url, video_id, 'Downloading video json')
if playinfo.get('message', '') != 'success': if playinfo.get('message', '') != 'success':
raise ExtractorError(playinfo['message']) raise ExtractorError(playinfo.get('message', 'JSON request unsuccessful'))
if not playinfo.get('result'): if not playinfo.get('result'):
raise ExtractorError('No videos found.') raise ExtractorError('No videos found.')