From c747e15cdf65ec4bf00f80f4cccd92832bd720fd Mon Sep 17 00:00:00 2001 From: DTrombett Date: Mon, 31 Mar 2025 17:31:39 +0200 Subject: [PATCH] Do not pass endTime if not present --- yt_dlp/extractor/europa.py | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/yt_dlp/extractor/europa.py b/yt_dlp/extractor/europa.py index d229a42e27..9d1a003f62 100644 --- a/yt_dlp/extractor/europa.py +++ b/yt_dlp/extractor/europa.py @@ -97,7 +97,7 @@ class EuropaIE(InfoExtractor): class EuroParlWebstreamIE(InfoExtractor): _VALID_URL = r'''(?x) https?://multimedia\.europarl\.europa\.eu/ - (?:[^/]*/)?webstreaming/(?:[^_]*_)?(?P[\w-]+) + (?P[^/]*/)?webstreaming/(?:[^_]*_)?(?P[\w-]+) ''' _TESTS = [{ 'url': 'https://multimedia.europarl.europa.eu/pl/webstreaming/plenary-session_20220914-0900-PLENARY', @@ -201,8 +201,20 @@ class EuroParlWebstreamIE(InfoExtractor): }] def _real_extract(self, url): - video_id = self._match_id(url) - webpage = self._download_webpage(f'https://control.eup.glcloud.eu/content-manager/content-page/{video_id}', video_id) + lang, video_id = self._match_valid_url(url).group('lang', 'id') + query = { + 'lang': lang, + 'audio': lang, + 'autoplay': 'true', + 'logo': 'false', + 'muted': 'false', + 'fullscreen': 'true', + 'disclaimer': 'false', + 'multicast': 'true', + 'analytics': 'false', + } + webpage = self._download_webpage(f'https://control.eup.glcloud.eu/content-manager/content-page/{video_id}?lang=en&audio=en&autoplay=true&logo=false&muted=false&fullscreen=true&disclaimer=false&multicast=true&analytics=false', + video_id, 'Downloading iframe', query=query) stream_info = self._search_json(r'