diff options
author | James Taylor <user234683@users.noreply.github.com> | 2018-07-13 16:54:52 -0700 |
---|---|---|
committer | James Taylor <user234683@users.noreply.github.com> | 2018-07-13 16:54:52 -0700 |
commit | 5b8a50c1c4c5ebee130e7e14289427482e0a6ab6 (patch) | |
tree | b527b53bf266db59e80cd3a2e3c17111c5bd5f21 /youtube | |
parent | cccffb83544fec8d3297d57ea36aef307616ac95 (diff) | |
download | yt-local-5b8a50c1c4c5ebee130e7e14289427482e0a6ab6.tar.lz yt-local-5b8a50c1c4c5ebee130e7e14289427482e0a6ab6.tar.xz yt-local-5b8a50c1c4c5ebee130e7e14289427482e0a6ab6.zip |
fix issue with automatic subtitles being outside the video
Diffstat (limited to 'youtube')
-rw-r--r-- | youtube/youtube.py | 4 |
1 files changed, 3 insertions, 1 deletions
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' |