]> gitweb @ CieloNegro.org - youtube-dl.git/blobdiff - youtube_dl/InfoExtractors.py
Merge pull request #363 from chalet16/master
[youtube-dl.git] / youtube_dl / InfoExtractors.py
index 40f96ad76590bc732c4d5c422d1d839fe6eb9986..0b5d76bdbd89f393340afdec9e0a79b86df615c8 100644 (file)
@@ -182,7 +182,7 @@ class YoutubeIE(InfoExtractor):
                        end = "%02i:%02i:%02i,%03i" %(end/(60*60), end/60%60, end%60, end%1*1000)
                        caption = unescapeHTML(caption)
                        caption = unescapeHTML(caption) # double cycle, intentional
-                       srt += str(n) + '\n'
+                       srt += str(n+1) + '\n'
                        srt += start + ' --> ' + end + '\n'
                        srt += caption + '\n\n'
                return srt
@@ -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)