mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-08-25 08:41:48 +02:00
[extractor] Allow note=False
when extracting manifests
This commit is contained in:
parent
337e0c62f8
commit
37a3bb66a7
@ -1909,8 +1909,8 @@ def _extract_m3u8_formats_and_subtitles(
|
|||||||
|
|
||||||
res = self._download_webpage_handle(
|
res = self._download_webpage_handle(
|
||||||
m3u8_url, video_id,
|
m3u8_url, video_id,
|
||||||
note=note or 'Downloading m3u8 information',
|
note='Downloading m3u8 information' if note is None else note,
|
||||||
errnote=errnote or 'Failed to download m3u8 information',
|
errnote='Failed to download m3u8 information' if errnote is None else errnote,
|
||||||
fatal=fatal, data=data, headers=headers, query=query)
|
fatal=fatal, data=data, headers=headers, query=query)
|
||||||
|
|
||||||
if res is False:
|
if res is False:
|
||||||
@ -2059,7 +2059,7 @@ def extract_media(x_media_line):
|
|||||||
# <https://tools.ietf.org/html/rfc8216#section-3.1>
|
# <https://tools.ietf.org/html/rfc8216#section-3.1>
|
||||||
sub_info['ext'] = 'vtt'
|
sub_info['ext'] = 'vtt'
|
||||||
sub_info['protocol'] = 'm3u8_native'
|
sub_info['protocol'] = 'm3u8_native'
|
||||||
lang = media.get('LANGUAGE') or 'unknown'
|
lang = media.get('LANGUAGE') or 'und'
|
||||||
subtitles.setdefault(lang, []).append(sub_info)
|
subtitles.setdefault(lang, []).append(sub_info)
|
||||||
if media_type not in ('VIDEO', 'AUDIO'):
|
if media_type not in ('VIDEO', 'AUDIO'):
|
||||||
return
|
return
|
||||||
@ -2465,8 +2465,8 @@ def _extract_mpd_formats_and_subtitles(
|
|||||||
fatal=True, data=None, headers={}, query={}):
|
fatal=True, data=None, headers={}, query={}):
|
||||||
res = self._download_xml_handle(
|
res = self._download_xml_handle(
|
||||||
mpd_url, video_id,
|
mpd_url, video_id,
|
||||||
note=note or 'Downloading MPD manifest',
|
note='Downloading MPD manifest' if note is None else note,
|
||||||
errnote=errnote or 'Failed to download MPD manifest',
|
errnote='Failed to download MPD manifest' if errnote is None else errnote,
|
||||||
fatal=fatal, data=data, headers=headers, query=query)
|
fatal=fatal, data=data, headers=headers, query=query)
|
||||||
if res is False:
|
if res is False:
|
||||||
return [], {}
|
return [], {}
|
||||||
@ -2795,8 +2795,8 @@ def _extract_ism_formats(self, *args, **kwargs):
|
|||||||
def _extract_ism_formats_and_subtitles(self, ism_url, video_id, ism_id=None, note=None, errnote=None, fatal=True, data=None, headers={}, query={}):
|
def _extract_ism_formats_and_subtitles(self, ism_url, video_id, ism_id=None, note=None, errnote=None, fatal=True, data=None, headers={}, query={}):
|
||||||
res = self._download_xml_handle(
|
res = self._download_xml_handle(
|
||||||
ism_url, video_id,
|
ism_url, video_id,
|
||||||
note=note or 'Downloading ISM manifest',
|
note='Downloading ISM manifest' if note is None else note,
|
||||||
errnote=errnote or 'Failed to download ISM manifest',
|
errnote='Failed to download ISM manifest' if errnote is None else errnote,
|
||||||
fatal=fatal, data=data, headers=headers, query=query)
|
fatal=fatal, data=data, headers=headers, query=query)
|
||||||
if res is False:
|
if res is False:
|
||||||
return [], {}
|
return [], {}
|
||||||
|
Loading…
Reference in New Issue
Block a user