aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2016-02-25 00:42:19 +0600
committerSergey M․ <dstftw@gmail.com>2016-02-25 00:42:19 +0600
commit5c0a57185cf925e22b59004150d6b00cd7fd0417 (patch)
tree6ab8750dfbe8ee7a5ca07cd9cd9dee886e3a6d5f /youtube_dl/extractor
parent43479d9e9df3aa4a0c919bd1b5ff74d53095cac7 (diff)
[motherless] Detect non-existing videos
Diffstat (limited to 'youtube_dl/extractor')
-rw-r--r--youtube_dl/extractor/motherless.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/youtube_dl/extractor/motherless.py b/youtube_dl/extractor/motherless.py
index b3bfcac9e..30e686a4e 100644
--- a/youtube_dl/extractor/motherless.py
+++ b/youtube_dl/extractor/motherless.py
@@ -5,6 +5,7 @@ import re
from .common import InfoExtractor
from ..utils import (
+ ExtractorError,
str_to_int,
unified_strdate,
)
@@ -66,6 +67,11 @@ class MotherlessIE(InfoExtractor):
video_id = self._match_id(url)
webpage = self._download_webpage(url, video_id)
+ if any(p in webpage for p in (
+ '<title>404 - MOTHERLESS.COM<',
+ ">The page you're looking for cannot be found.<")):
+ raise ExtractorError('Video %s does not exist' % video_id, expected=True)
+
title = self._html_search_regex(
r'id="view-upload-title">\s+([^<]+)<', webpage, 'title')
video_url = self._html_search_regex(