From 5b8a50c1c4c5ebee130e7e14289427482e0a6ab6 Mon Sep 17 00:00:00 2001 From: James Taylor Date: Fri, 13 Jul 2018 16:54:52 -0700 Subject: fix issue with automatic subtitles being outside the video --- youtube/youtube.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/youtube/youtube.py b/youtube/youtube.py index d2bffed..aa23d06 100644 --- a/youtube/youtube.py +++ b/youtube/youtube.py @@ -45,7 +45,9 @@ def youtube(env, start_response): return local_playlist.get_playlist_page(path[10:], query_string=query_string).encode() elif path.startswith("/api/"): start_response('200 OK', () ) - return common.fetch_url('https://www.youtube.com' + path + ('?' + query_string if query_string else '')) + result = common.fetch_url('https://www.youtube.com' + path + ('?' + query_string if query_string else '')) + result = result.replace(b"align:start position:0%", b"") + return result else: start_response('404 Not Found', () ) return b'404 Not Found' -- cgit v1.2.3