X-Git-Url: http://git.cielonegro.org/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=youtube_dl%2FInfoExtractors.py;h=0b5d76bdbd89f393340afdec9e0a79b86df615c8;hb=65dc7d027278d93b4a760dcbf6d19067fb8ff85d;hp=0fc39163ee2a74131ed84442c68f388a72fad0f1;hpb=9ab3406ddb84a84a80f1be788af745d5a407ae23;p=youtube-dl.git diff --git a/youtube_dl/InfoExtractors.py b/youtube_dl/InfoExtractors.py index 0fc39163e..0b5d76bdb 100644 --- a/youtube_dl/InfoExtractors.py +++ b/youtube_dl/InfoExtractors.py @@ -181,8 +181,8 @@ class YoutubeIE(InfoExtractor): start = "%02i:%02i:%02i,%03i" %(start/(60*60), start/60%60, start%60, start%1*1000) end = "%02i:%02i:%02i,%03i" %(end/(60*60), end/60%60, end%60, end%1*1000) caption = unescapeHTML(caption) - caption = unescapeHTML(caption) # double cycle, inentional - srt += str(n) + '\n' + caption = unescapeHTML(caption) # double cycle, intentional + 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) @@ -2450,7 +2455,7 @@ class SoundcloudIE(InfoExtractor): try: upload_date = datetime.datetime.strptime(mobj.group(1), '%B %d, %Y %H:%M').strftime('%Y%m%d') except Exception, e: - print str(e) + self._downloader.to_stderr(str(e)) # for soundcloud, a request to a cross domain is required for cookies request = urllib2.Request('http://media.soundcloud.com/crossdomain.xml', std_headers)