浏览代码

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

Filippo Valsorda 13 年之前
父节点
当前提交
7df97fb59f
共有 3 个文件被更改,包括 5 次插入0 次删除
  1. 二进制
      youtube-dl
  2. 二进制
      youtube-dl.exe
  3. 5 0
      youtube_dl/InfoExtractors.py

二进制
youtube-dl


二进制
youtube-dl.exe


+ 5 - 0
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)