X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=youtube_dl%2Fextractor%2Fredtube.py;h=b1bde1e8117bf5fa72cccf94ce825a0ad31c274e;hb=042b66493398dd8c3bb31216e3f828b98716810d;hp=879bcf81d8136ff4bb1f90a9312ff5c7812fdfb8;hpb=18ebd1a843717991a41a5f9901c79b5857e8bc98;p=youtube-dl
diff --git a/youtube_dl/extractor/redtube.py b/youtube_dl/extractor/redtube.py
index 879bcf81d..b1bde1e81 100644
--- a/youtube_dl/extractor/redtube.py
+++ b/youtube_dl/extractor/redtube.py
@@ -3,12 +3,13 @@ from __future__ import unicode_literals
import re
from .common import InfoExtractor
-from ..compat import compat_str
from ..utils import (
ExtractorError,
int_or_none,
+ merge_dicts,
str_to_int,
unified_strdate,
+ url_or_none,
)
@@ -42,14 +43,24 @@ class RedTubeIE(InfoExtractor):
webpage = self._download_webpage(
'http://www.redtube.com/%s' % video_id, video_id)
- if any(s in webpage for s in ['video-deleted-info', '>This video has been removed']):
- raise ExtractorError('Video %s has been removed' % video_id, expected=True)
+ ERRORS = (
+ (('video-deleted-info', '>This video has been removed'), 'has been removed'),
+ (('private_video_text', '>This video is private', '>Send a friend request to its owner to be able to view it'), 'is private'),
+ )
- title = self._html_search_regex(
- (r'