X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=youtube_dl%2Fextractor%2Fsmotri.py;h=26f361c93990b6b92ff31d2447b70f7e08263d00;hb=aaeb86f68289496595930a7d6a04457917826d13;hp=d031fe40167f7ff704c26fde3972d4fa45f1b3b5;hpb=2f15832f569834a37ac3ee6140a3b997407c04cd;p=youtube-dl diff --git a/youtube_dl/extractor/smotri.py b/youtube_dl/extractor/smotri.py index d031fe401..26f361c93 100644 --- a/youtube_dl/extractor/smotri.py +++ b/youtube_dl/extractor/smotri.py @@ -69,6 +69,7 @@ class SmotriIE(InfoExtractor): 'params': { 'videopassword': 'qwerty', }, + 'skip': 'Video is not approved by moderator', }, # age limit + video-password { @@ -86,7 +87,22 @@ class SmotriIE(InfoExtractor): }, 'params': { 'videopassword': '333' - } + }, + 'skip': 'Video is not approved by moderator', + }, + # not approved by moderator, but available + { + 'url': 'http://smotri.com/video/view/?id=v28888533b73', + 'md5': 'f44bc7adac90af518ef1ecf04893bb34', + 'info_dict': { + 'id': 'v28888533b73', + 'ext': 'mp4', + 'title': 'Russian Spies Killed By ISIL Child Soldier', + 'uploader': 'Mopeder', + 'uploader_id': 'mopeder', + 'duration': 71, + 'thumbnail': 'http://frame9.loadup.ru/d7/32/2888853.2.3.jpg', + }, }, # swf player { @@ -144,13 +160,16 @@ class SmotriIE(InfoExtractor): video = self._download_json(request, video_id, 'Downloading video JSON') - if video.get('_moderate_no') or not video.get('moderated'): - raise ExtractorError('Video %s has not been approved by moderator' % video_id, expected=True) + video_url = video.get('_vidURL') or video.get('_vidURL_mp4') - if video.get('error'): - raise ExtractorError('Video %s does not exist' % video_id, expected=True) + if not video_url: + if video.get('_moderate_no') or not video.get('moderated'): + raise ExtractorError( + 'Video %s has not been approved by moderator' % video_id, expected=True) + + if video.get('error'): + raise ExtractorError('Video %s does not exist' % video_id, expected=True) - video_url = video.get('_vidURL') or video.get('_vidURL_mp4') title = video['title'] thumbnail = video['_imgURL'] upload_date = unified_strdate(video['added'])