mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-06-27 04:00:39 +02:00
[ie/youtube] Check any ios
m3u8 formats prior to download (#13524)
Closes #13511 Authored by: bashonly
This commit is contained in:
parent
ff6f94041a
commit
8f94b76cbf
@ -2219,6 +2219,7 @@ class YoutubeDL:
|
|||||||
self.report_warning(f'Unable to delete temporary file "{temp_file.name}"')
|
self.report_warning(f'Unable to delete temporary file "{temp_file.name}"')
|
||||||
f['__working'] = success
|
f['__working'] = success
|
||||||
if success:
|
if success:
|
||||||
|
f.pop('__needs_testing', None)
|
||||||
yield f
|
yield f
|
||||||
else:
|
else:
|
||||||
self.to_screen('[info] Unable to download format {}. Skipping...'.format(f['format_id']))
|
self.to_screen('[info] Unable to download format {}. Skipping...'.format(f['format_id']))
|
||||||
@ -3963,6 +3964,7 @@ class YoutubeDL:
|
|||||||
self._format_out('UNSUPPORTED', self.Styles.BAD_FORMAT) if f.get('ext') in ('f4f', 'f4m') else None,
|
self._format_out('UNSUPPORTED', self.Styles.BAD_FORMAT) if f.get('ext') in ('f4f', 'f4m') else None,
|
||||||
(self._format_out('Maybe DRM', self.Styles.WARNING) if f.get('has_drm') == 'maybe'
|
(self._format_out('Maybe DRM', self.Styles.WARNING) if f.get('has_drm') == 'maybe'
|
||||||
else self._format_out('DRM', self.Styles.BAD_FORMAT) if f.get('has_drm') else None),
|
else self._format_out('DRM', self.Styles.BAD_FORMAT) if f.get('has_drm') else None),
|
||||||
|
self._format_out('Untested', self.Styles.WARNING) if f.get('__needs_testing') else None,
|
||||||
format_field(f, 'format_note'),
|
format_field(f, 'format_note'),
|
||||||
format_field(f, 'container', ignore=(None, f.get('ext'))),
|
format_field(f, 'container', ignore=(None, f.get('ext'))),
|
||||||
delim=', '), delim=' '),
|
delim=', '), delim=' '),
|
||||||
|
@ -3556,6 +3556,11 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
|
|||||||
f['format_note'] = join_nonempty(f.get('format_note'), 'MISSING POT', delim=' ')
|
f['format_note'] = join_nonempty(f.get('format_note'), 'MISSING POT', delim=' ')
|
||||||
f['source_preference'] -= 20
|
f['source_preference'] -= 20
|
||||||
|
|
||||||
|
# XXX: Check if IOS HLS formats are affected by player PO token enforcement; temporary
|
||||||
|
# See https://github.com/yt-dlp/yt-dlp/issues/13511
|
||||||
|
if proto == 'hls' and client_name == 'ios':
|
||||||
|
f['__needs_testing'] = True
|
||||||
|
|
||||||
itags[itag].add(key)
|
itags[itag].add(key)
|
||||||
|
|
||||||
if itag and all_formats:
|
if itag and all_formats:
|
||||||
@ -4284,6 +4289,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
|
|||||||
|
|
||||||
if upload_date and live_status not in ('is_live', 'post_live', 'is_upcoming'):
|
if upload_date and live_status not in ('is_live', 'post_live', 'is_upcoming'):
|
||||||
# Newly uploaded videos' HLS formats are potentially problematic and need to be checked
|
# Newly uploaded videos' HLS formats are potentially problematic and need to be checked
|
||||||
|
# XXX: This is redundant for as long as we are already checking all IOS HLS formats
|
||||||
upload_datetime = datetime_from_str(upload_date).replace(tzinfo=dt.timezone.utc)
|
upload_datetime = datetime_from_str(upload_date).replace(tzinfo=dt.timezone.utc)
|
||||||
if upload_datetime >= datetime_from_str('today-2days'):
|
if upload_datetime >= datetime_from_str('today-2days'):
|
||||||
for fmt in info['formats']:
|
for fmt in info['formats']:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user