From 7cc35d10511f4ead5e92a3949a444d81ecadb119 Mon Sep 17 00:00:00 2001 From: Alba Mendez Date: Sat, 17 Sep 2022 17:21:24 +0200 Subject: [PATCH] fix decoding logic --- youtube_dl/extractor/rtve.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/youtube_dl/extractor/rtve.py b/youtube_dl/extractor/rtve.py index d2fb754cf..cecea5812 100644 --- a/youtube_dl/extractor/rtve.py +++ b/youtube_dl/extractor/rtve.py @@ -86,8 +86,12 @@ class RTVEALaCartaIE(InfoExtractor): break data = encrypted_data.read(length) if chunk_type == b'tEXt': - alphabet_data, text = data.split(b'\0') - quality, url_data = text.split(b'%%') + alphabet_data, text = data.replace(b'\0', b'').split(b'#') + components = text.split(b'%%') + if len(components) < 2: + components.insert(0, b'') + quality, url_data = components + alphabet = [] e = 0 d = 0