From b919f9463e90600e3ca869426643d69edc42025c Mon Sep 17 00:00:00 2001 From: Iulian Onofrei <6d0847b9@opayq.com> Date: Wed, 12 Aug 2020 16:24:54 +0300 Subject: [PATCH] Add alternative option to the embed-only error For example, running: ``` youtube-dl https://player.vimeo.com/video/356169265 ``` outputs: > [vimeo] 356169265: Downloading webpage > ERROR: Cannot download embed-only video without embedding URL. Please call > youtube-dl with the URL of the page that embeds this video. Following the instructions and running: ``` youtube-dl https://www.raywenderlich.com/4720178-ios-accessibility-tutorial-making-custom-controls-accessible ``` outputs: > [RayWenderlichCourse] 4720178-ios-accessibility-tutorial-making-custom-controls-accessible: > Downloading webpage > [download] Downloading playlist: iOS Accessibility Tutorial: Making Custom > Controls Accessible > [RayWenderlichCourse] playlist iOS Accessibility Tutorial: Making Custom > Controls Accessible: Collected 0 video ids (downloading 0 of them) > [download] Finished downloading playlist: iOS Accessibility Tutorial: Making > Custom Controls Accessible And only this works: ``` youtube-dl https://player.vimeo.com/video/356169265 --referer \ "https://www.raywenderlich.com/4720178-ios-accessibility-tutorial-making-custom-controls-accessible" ``` --- youtube_dl/extractor/vimeo.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/youtube_dl/extractor/vimeo.py b/youtube_dl/extractor/vimeo.py index 421795b94..88d5b3382 100644 --- a/youtube_dl/extractor/vimeo.py +++ b/youtube_dl/extractor/vimeo.py @@ -601,7 +601,8 @@ class VimeoIE(VimeoBaseInfoExtractor): raise ExtractorError( 'Cannot download embed-only video without embedding ' 'URL. Please call youtube-dl with the URL of the page ' - 'that embeds this video.', + 'that embeds this video, or by passing that to the ' + '--referer argument.', expected=True) raise