From f0dada1643aa49a1e348ca9808323ec9b5974d5f Mon Sep 17 00:00:00 2001 From: Jesse Millwood Date: Wed, 7 Feb 2024 14:10:11 -0500 Subject: [PATCH] Update yt_dlp/extractor/fosdem.py Co-authored-by: pukkandan --- yt_dlp/extractor/fosdem.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/yt_dlp/extractor/fosdem.py b/yt_dlp/extractor/fosdem.py index d0aff28afb..603a0313ba 100644 --- a/yt_dlp/extractor/fosdem.py +++ b/yt_dlp/extractor/fosdem.py @@ -55,14 +55,12 @@ class FosdemIE(InfoExtractor): ] def _real_extract(self, url): - video_id = self._match_id(url) - groups = self._match_valid_url(url).groupdict() + video_id, url_type, year = self._match_valid_url(url).group('id', 'type', 'year') webpage = self._download_webpage(url, video_id) - year = groups.get('year') title_rgx = r'
\n\s+

(.+?)

' title = self._html_search_regex(title_rgx, webpage, 'title') \ or self._og_search_title(webpage) - if groups.get('url_type') == 'event': + if url_type == 'event': evnt_blurb_rgx = r'
\n*(?P(
(

(.+?)

\n*)+
)+\n*(
(

(.+?)

\n*)*
))+\n*
' evnt_blurb = self._html_search_regex(evnt_blurb_rgx, webpage, @@ -89,7 +87,7 @@ def _real_extract(self, url): 'cast': cast, 'webpage_url': url, } - elif groups.get('url_type') == 'track': + elif url_type == 'track': events_rgx = r'/[0-9]+/schedule/event/[a-z0-9]+/)' events_slugs = re.findall(events_rgx, webpage) or [] @@ -103,5 +101,4 @@ def _real_extract(self, url): playlist_title=title, playlist_description=None) else: - url_type = groups.get('url_type') print(f'The {url_type} is not supported')