]>
jfr.im git - yt-dlp.git/blob - yt_dlp/extractor/genericembeds.py
64bd20e3af84457a19ec63800fd88f18e13ccfcc
1 from .common
import InfoExtractor
2 from ..utils
import make_archive_id
5 class HTML5MediaEmbedIE(InfoExtractor
):
10 'url': 'https://html.com/media/',
12 'title': 'HTML5 Media',
13 'description': 'md5:933b2d02ceffe7a7a0f3c8326d91cc2a',
19 def _extract_from_webpage(self
, url
, webpage
):
20 video_id
, title
= self
._generic
_id
(url
), self
._generic
_title
(url
)
21 entries
= self
._parse
_html
5_media
_entries
(url
, webpage
, video_id
, m3u8_id
='hls') or []
22 for num
, entry
in enumerate(entries
, start
=1):
24 'id': f
'{video_id}-{num}',
25 'title': f
'{title} ({num})',
27 make_archive_id('generic', f
'{video_id}-{num}' if len(entries
) > 1 else video_id
),
30 self
._sort
_formats
(entry
['formats'])