From 5a7243b741f2f9a746b0955de8bae2f558efd074 Mon Sep 17 00:00:00 2001 From: vallovic Date: Thu, 6 May 2021 23:20:20 +0100 Subject: [PATCH] Working around new URLs --- youtube_dl/extractor/rtp.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/youtube_dl/extractor/rtp.py b/youtube_dl/extractor/rtp.py index da30a7789..d421f2f1a 100644 --- a/youtube_dl/extractor/rtp.py +++ b/youtube_dl/extractor/rtp.py @@ -70,6 +70,9 @@ class RTPIE(InfoExtractor): else: decoded_file_url = compat_urllib_parse_unquote(hls_encoded) + # Workaround for new behaviour + decoded_file_url = decoded_file_url.replace('streaming-vod.rtp.pt/hls/', 'streaming-ondemand.rtp.pt/').replace('.mp4/', '/') + # Insert the decoded HLS file URL into pure JSON string json_string_for_config += '\nfile: "' + decoded_file_url + '",' else: