From 7c046d82eec7a666a311b48fa2a243b9b16a3365 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs?= Date: Tue, 29 Dec 2020 17:32:40 -0500 Subject: General theme: Fix script generate for timestamp Also add support librejs --- youtube/__init__.py | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) (limited to 'youtube/__init__.py') diff --git a/youtube/__init__.py b/youtube/__init__.py index ff5c984..3c85d47 100644 --- a/youtube/__init__.py +++ b/youtube/__init__.py @@ -62,10 +62,26 @@ def timestamp_replacement(match): for part in match.group(0).split(':'): time_seconds = 60*time_seconds + int(part) return ( - '' + match.group(0) - + '' + """ + %s + + """ % ( + str(time_seconds), + match.group(0), + str(time_seconds), + str(time_seconds) + ) ) -- cgit v1.2.3