From ff47d11269d6cffb36c8b86cf8f5e8effa881670 Mon Sep 17 00:00:00 2001 From: vallovic Date: Wed, 21 Apr 2021 16:24:26 +0100 Subject: [PATCH] Ignore EVEN more comments in RTP source code --- youtube_dl/extractor/rtp.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/youtube_dl/extractor/rtp.py b/youtube_dl/extractor/rtp.py index 1c487749b..2f9360e12 100644 --- a/youtube_dl/extractor/rtp.py +++ b/youtube_dl/extractor/rtp.py @@ -34,6 +34,10 @@ class RTPIE(InfoExtractor): video_id = self._match_id(url) webpage = self._download_webpage(url, video_id) + + # Remove JS multi-line comments from webpage source + webpage = re.sub(r'(\/\*.*\*\/)', '', webpage, flags=re.DOTALL) + title = self._html_search_regex(r'(.+?)', webpage, 'title') # Get JS object