From 3707acbc18a2b39641e6fdd09476fd69dfb6c19f Mon Sep 17 00:00:00 2001 From: kjy00302 Date: Sun, 3 Apr 2016 05:21:01 +0900 Subject: [PATCH] fix cloud to ass converter --- youtube_dl/extractor/tvple.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/youtube_dl/extractor/tvple.py b/youtube_dl/extractor/tvple.py index 4dcc0b2bb..275bdb32a 100644 --- a/youtube_dl/extractor/tvple.py +++ b/youtube_dl/extractor/tvple.py @@ -69,7 +69,7 @@ class TvpleIE(InfoExtractor): """convert tvple cloud to ass subtitle""" sec = [] - asstemp1 = "[Script Info]\nTitle: %s\nScriptType: v4.00+\nWrapStyle: 0\nPlayResX: %d\nPlayResY: %d\nScaledBorderAndShadow: yes\n\n[V4+ Styles]\nFormat: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, Encoding\nStyle: Default,Arial,14,&H23FFFFFF,&H000000FF,&HC8000000,&HC8000000,-1,0,0,0,100,100,0,0,1,2,2,5,10,10,10,1\n\n" % (title + '-' + videoid, width, height) + asstemp1 = "[Script Info]\nTitle: %s\nScriptType: v4.00+\nWrapStyle: 0\nPlayResX: %d\nPlayResY: %d\nScaledBorderAndShadow: yes\n\n[V4+ Styles]\nFormat: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, Encoding\nStyle: Default,Arial,25,&H23FFFFFF,&H000000FF,&HC8000000,&HC8000000,-1,0,0,0,100,100,0,0,1,2,2,5,10,10,10,1\n\n" % (title + '-' + videoid, width, height) for i in json: if(i != '_warning'): @@ -139,7 +139,7 @@ class TvpleIE(InfoExtractor): 'height': int(playpage['stream']['height']) }) - subtitles = self.extract_subtitles(playpage, title, video_id, duration, playpage['stream']['width'], playpage['stream']['height']) + subtitles = self.extract_subtitles(playpage, title, video_id, duration, int(playpage['stream']['width']), int(playpage['stream']['height'])) return { 'id': video_id,