Skip to content

A feature-rich command-line audio/video downloader

display a meaningful error message on rental videos (#359)

Filippo Valsorda7df97fb59f79
diff --git a/youtube-dl b/youtube-dl
index f65e97fd07..66e5ff5370 100755
Binary files a/youtube-dl and b/youtube-dl differ
diff --git a/youtube-dl.exe b/youtube-dl.exe
index 6d19ef5eac..984c92c421 100755
Binary files a/youtube-dl.exe and b/youtube-dl.exe differ
diff --git a/youtube_dl/InfoExtractors.py b/youtube_dl/InfoExtractors.py
index 40f96ad765..d02bd29f74 100644
--- a/youtube_dl/InfoExtractors.py
+++ b/youtube_dl/InfoExtractors.py
@@ -311,6 +311,11 @@ class YoutubeIE(InfoExtractor):
self._downloader.trouble(u'ERROR: "token" parameter not in video info for unknown reason')
return
+ # Check for "rental" videos
+ if 'ypc_video_rental_bar_text' in video_info and 'author' not in video_info:
+ self._downloader.trouble(u'ERROR: "rental" videos not supported')
+ return
+
# Start extracting information
self.report_information_extraction(video_id)