From 4cdc976bd861b5835601ae402bef543eacd88f3d Mon Sep 17 00:00:00 2001 From: sepro <4618135+seproDev@users.noreply.github.com> Date: Sun, 7 Jul 2024 21:57:18 +0200 Subject: [PATCH] [ie/yle_areena] Fix metadata extraction (#10380) Authored by: seproDev --- yt_dlp/extractor/yle_areena.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/yt_dlp/extractor/yle_areena.py b/yt_dlp/extractor/yle_areena.py index 05f16d1f5..ef9e96804 100644 --- a/yt_dlp/extractor/yle_areena.py +++ b/yt_dlp/extractor/yle_areena.py @@ -11,6 +11,7 @@ class YleAreenaIE(InfoExtractor): _VALID_URL = r'https?://areena\.yle\.fi/(?P[\d-]+)' + _GEO_COUNTRIES = ['FI'] _TESTS = [ { 'url': 'https://areena.yle.fi/1-4371942', @@ -19,7 +20,7 @@ class YleAreenaIE(InfoExtractor): 'id': '0_a3tjk92c', 'ext': 'mp4', 'title': 'Pouchit', - 'description': 'md5:d487309c3abbe5650265bbd1742d2f82', + 'description': 'md5:01071d7056ceec375f63960f90c35366', 'series': 'Modernit miehet', 'season': 'Season 1', 'season_number': 1, @@ -87,8 +88,8 @@ def _real_extract(self, url): }) # Example title: 'K1, J2: Pouchit | Modernit miehet' - series, season_number, episode_number, episode = self._search_regex( - r'K(?P[\d]+),\s*J(?P[\d]+):?\s*\b(?P[^|]+)\s*|\s*(?P.+)', + season_number, episode_number, episode, series = self._search_regex( + r'K(?P\d+),\s*J(?P\d+):?\s*\b(?P[^|]+)\s*|\s*(?P.+)', info.get('title') or '', 'episode metadata', group=('season_no', 'episode_no', 'episode', 'series'), default=(None, None, None, None)) description = traverse_obj(video_data, ('data', 'ongoing_ondemand', 'description', 'fin'), expected_type=str)