fix(europa): update preferred language and URL parsing in EuroParlWebstreamIE class

This commit is contained in:
voidful 2024-04-10 17:31:35 +08:00
parent e7b87d9742
commit 06ba180cda

View File

@ -93,7 +93,12 @@ class EuropaIE(InfoExtractor):
class EuroParlWebstreamIE(InfoExtractor):
_VALID_URL = r'''(?x)https?://multimedia\.europarl\.europa\.eu/(?:(?:[^/#?]+/)*[\w-]+/)?(?:(?!video)[^/#?]+/)?(?:[\w-]+_)?(?P<id>[\w-]+)'''
_VALID_URL = r'''(?x)https?://multimedia\.europarl\.europa\.eu/
(?:(?:[^/#?]+/)*[\w-]+/)?
(?:(?!video)[^/#?]+/)?
(?:[\w-]+_)?
(?P<id>[\w-]+)
'''
_TESTS = [{
'url': 'https://multimedia.europarl.europa.eu/pl/webstreaming/plenary-session_20220914-0900-PLENARY',
'info_dict': {
@ -139,7 +144,16 @@ class EuroParlWebstreamIE(InfoExtractor):
'live_status': 'is_live',
},
'skip': 'Not live anymore'
}]
}, {
# live stream
'url': 'https://multimedia.europarl.europa.eu/en/webstreaming/20240320-1345-SPECIAL-PRESSER',
'info_dict': {
'id': '20240320-1345-SPECIAL-PRESSER',
'ext': 'mp4',
'release_date': '20240320',
}
}
]
def _real_extract(self, url):
display_id = self._match_id(url)