Compare commits

...

2 Commits

Author SHA1 Message Date
bashonly
49fe907b2f
editing code in gh web ui is pain 2024-01-31 15:47:43 +00:00
bashonly
40b01c7a70
Extract described video HLS formats
Co-authored-by: sepro <4618135+seproDev@users.noreply.github.com>
2024-01-31 15:45:45 +00:00

View File

@ -231,8 +231,17 @@ class NFBIE(NFBBaseIE):
if 'MESSAGE_GEOBLOCKED' in player: if 'MESSAGE_GEOBLOCKED' in player:
self.raise_geo_restricted(countries=self._GEO_COUNTRIES) self.raise_geo_restricted(countries=self._GEO_COUNTRIES)
source = self._html_search_regex(r'source:\s*\'([^\']+)', player, 'source') formats, subtitles = self._extract_m3u8_formats_and_subtitles(
formats, subtitles = self._extract_m3u8_formats_and_subtitles(source, video_id, 'mp4') self._html_search_regex(r'source:\s*\'([^\']+)', player, 'm3u8 url'),
video_id, 'mp4', m3u8_id='hls')
if dv_source := self._html_search_regex(r'dvSource:\s*\'([^\']+)', player, 'dv', default=None):
fmts, subs = self._extract_m3u8_formats_and_subtitles(
dv_source, video_id, 'mp4', m3u8_id='dv', preference=-2, fatal=False)
for fmt in fmts:
fmt['format_note'] = 'described video'
formats.extend(fmts)
self._merge_subtitles(subs, target=subtitles)
info = { info = {
'id': video_id, 'id': video_id,