Skip to content

Commit

Permalink
[ie/mediastream] Make embed extraction non-fatal
Browse files Browse the repository at this point in the history
Authored by: bashonly
  • Loading branch information
bashonly committed Sep 16, 2023
1 parent 5367585 commit 635ae31
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion yt_dlp/extractor/mediastream.py
Expand Up @@ -14,7 +14,7 @@ class MediaStreamBaseIE(InfoExtractor):
_BASE_URL_RE = r'https?://mdstrm\.com/(?:embed|live-stream)'

def _extract_mediastream_urls(self, webpage):
yield from traverse_obj(list(self._yield_json_ld(webpage, None)), (
yield from traverse_obj(list(self._yield_json_ld(webpage, None, fatal=False)), (
lambda _, v: v['@type'] == 'VideoObject', ('embedUrl', 'contentUrl'),
{lambda x: x if re.match(rf'{self._BASE_URL_RE}/\w+', x) else None}))

Expand Down

0 comments on commit 635ae31

Please sign in to comment.