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

pull/8/head
Filippo Valsorda 2012-06-22 13:57:17 +02:00
rodzic 17f3c40a31
commit 7df97fb59f
3 zmienionych plików z 5 dodań i 0 usunięć

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Wyświetl plik

@ -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)