aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2014-03-08 12:24:43 +0100
committerPhilipp Hagemeister <phihag@phihag.de>2014-03-08 12:25:09 +0100
commit1060425cbb4beffc2a36aa361b03db60df0e40f8 (patch)
tree931e215e565cc289a49c4fdb88d38d30a479a66f /youtube_dl
parente9c092f1252d64040aa181f606e23cf7fc533dc1 (diff)
downloadyoutube-dl-1060425cbb4beffc2a36aa361b03db60df0e40f8.tar.xz
[vimeo] Add a better error message for embed-only videos (#2527)
Diffstat (limited to 'youtube_dl')
-rw-r--r--youtube_dl/extractor/vimeo.py14
1 files changed, 13 insertions, 1 deletions
diff --git a/youtube_dl/extractor/vimeo.py b/youtube_dl/extractor/vimeo.py
index 10c3d992d..4b4b472a5 100644
--- a/youtube_dl/extractor/vimeo.py
+++ b/youtube_dl/extractor/vimeo.py
@@ -8,6 +8,7 @@ import itertools
from .common import InfoExtractor
from .subtitles import SubtitlesInfoExtractor
from ..utils import (
+ compat_HTTPError,
compat_urllib_parse,
compat_urllib_request,
clean_html,
@@ -172,7 +173,18 @@ class VimeoIE(SubtitlesInfoExtractor):
# Retrieve video webpage to extract further information
request = compat_urllib_request.Request(url, None, headers)
- webpage = self._download_webpage(request, video_id)
+ try:
+ webpage = self._download_webpage(request, video_id)
+ except ExtractorError as ee:
+ if isinstance(ee.cause, compat_HTTPError) and ee.cause.code == 403:
+ errmsg = ee.cause.read()
+ if b'Because of its privacy settings, this video cannot be played here' in errmsg:
+ raise ExtractorError(
+ 'Cannot download embed-only video without embedding '
+ 'URL. Please call youtube-dl with the URL of the page '
+ 'that embeds this video.',
+ expected=True)
+ raise
# Now we begin extracting as much information as we can from what we
# retrieved. First we extract the information common to all extractors,