From 7700d64ab8f344c9d4b15d83bfe48b5914bf5461 Mon Sep 17 00:00:00 2001 From: garret Date: Sat, 29 Jul 2023 17:53:31 +0100 Subject: encode b64 partialkey as ascii fixes #14 new headers thing made b'bytes' into "b'bytes'", instead of just 'bytes' so it sent eg `X-Radiko-Partialkey: b'9lOaAg+2TZRSF+IsiDnUJg=='` likely a fix for this upstream soon, but will do the sensible thing and make it ascii myself https://discord.com/channels/807245652072857610/1112613156934668338/1134879336512634880 (yt-dlp discord) --- yt_dlp_plugins/extractor/radiko.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yt_dlp_plugins/extractor/radiko.py b/yt_dlp_plugins/extractor/radiko.py index d31c441..0078562 100755 --- a/yt_dlp_plugins/extractor/radiko.py +++ b/yt_dlp_plugins/extractor/radiko.py @@ -452,7 +452,7 @@ class _RadikoBaseIE(InfoExtractor): self.write_debug(f"KeyOffset: {key_offset}") raw_partial_key = self._FULL_KEY[key_offset:key_offset + key_length] - partial_key = base64.b64encode(raw_partial_key) + partial_key = base64.b64encode(raw_partial_key).decode("ascii") self.write_debug(partial_key) -- cgit v1.2.3-70-g09d2