diff --git a/yt_dlp/extractor/swearnet.py b/yt_dlp/extractor/swearnet.py index d3268bd8d..6bf128c6c 100644 --- a/yt_dlp/extractor/swearnet.py +++ b/yt_dlp/extractor/swearnet.py @@ -39,10 +39,10 @@ def _real_extract(self, url): 'episode_number': int_or_none(episode_number), } - if video_info['title'] is None: + if not video_info.get('title'): video_info['title'] = self._html_search_meta(['og:title', 'twitter:title'], webpage) - if video_info['description'] is None: + if not video_info.get('description'): video_info['description'] = self._html_search_meta(['og:description', 'twitter:description'], webpage) return video_info diff --git a/yt_dlp/extractor/vidyard.py b/yt_dlp/extractor/vidyard.py index 3132900ff..ac6ea39cc 100644 --- a/yt_dlp/extractor/vidyard.py +++ b/yt_dlp/extractor/vidyard.py @@ -300,13 +300,13 @@ def _extract_embed_urls(cls, url, webpage): # Extract inline/lightbox embeds for embed_elm in re.findall(r'(]+class=(["\'])(?:[^>"\']* )?vidyard-player-embed(?: [^>"\']*)?\2[^>]+[^>]*>)', webpage): - embed = extract_attributes(embed_elm[0]) or {} + embed = extract_attributes(embed_elm[0]) uuid = embed.get('data-uuid') if uuid: yield f'https://play.vidyard.com/{uuid}.html' def _real_extract(self, url): - video_id = self._match_valid_url(url).group('id') + video_id = self._match_id(url) video_json = self._fetch_video_json(video_id) if len(video_json['chapters']) == 1: