mirror of
https://codeberg.org/polarisfm/youtube-dl
synced 2024-11-22 16:44:32 +01:00
coding conventions
This commit is contained in:
parent
9ea71d2e77
commit
651fe192d0
@ -23,18 +23,26 @@ class TVNoeIE(InfoExtractor):
|
|||||||
video_id = self._match_id(url)
|
video_id = self._match_id(url)
|
||||||
webpage = self._download_webpage(url, video_id)
|
webpage = self._download_webpage(url, video_id)
|
||||||
|
|
||||||
dash_url = self._search_regex(
|
|
||||||
r"\s*src:\s*\'(?P<url>https?://[^\']+manifest.mpd)\',", webpage, 'mpd')
|
|
||||||
hls_url = self._search_regex(
|
|
||||||
r"\s*src:\s*\'(?P<url>https?://[^\']+playlist.m3u8)\',", webpage, 'm3u8')
|
|
||||||
|
|
||||||
formats = []
|
formats = []
|
||||||
|
hls_url = self._search_regex(
|
||||||
|
r"\s*src:\s*\'(?P<url>https?://[^\']+playlist.m3u8)\',", webpage, 'm3u8', fatal=False)
|
||||||
|
if hls_url:
|
||||||
|
dash_url = self._search_regex(
|
||||||
|
r"\s*src:\s*\'(?P<url>https?://[^\']+manifest.mpd)\',", webpage, 'mpd', fatal=False)
|
||||||
|
else:
|
||||||
|
dash_url = self._search_regex(
|
||||||
|
r"\s*src:\s*\'(?P<url>https?://[^\']+manifest.mpd)\',", webpage, 'mpd')
|
||||||
|
|
||||||
if dash_url:
|
if dash_url:
|
||||||
formats.extend(self._extract_mpd_formats(
|
formats.extend(self._extract_mpd_formats(
|
||||||
dash_url, video_id, mpd_id='dash', fatal=False))
|
dash_url, video_id, mpd_id='dash', fatal=False))
|
||||||
if hls_url:
|
if hls_url:
|
||||||
formats.extend(self._extract_m3u8_formats(
|
if formats:
|
||||||
hls_url, video_id, ext='mp4', m3u8_id='hls', fatal=False))
|
formats.extend(self._extract_m3u8_formats(
|
||||||
|
hls_url, video_id, ext='mp4', m3u8_id='hls', fatal=False))
|
||||||
|
else:
|
||||||
|
formats.extend(self._extract_m3u8_formats(
|
||||||
|
hls_url, video_id, ext='mp4', m3u8_id='hls'))
|
||||||
|
|
||||||
self._sort_formats(formats)
|
self._sort_formats(formats)
|
||||||
title = clean_html(self._search_regex(
|
title = clean_html(self._search_regex(
|
||||||
|
Loading…
Reference in New Issue
Block a user