1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-08-17 13:08:12 -04:00

Compare commits

...

2 Commits

2 changed files with 5 additions and 3 deletions

View File

@ -2063,6 +2063,7 @@ class InfoExtractor:
'protocol': entry_protocol, 'protocol': entry_protocol,
'preference': preference, 'preference': preference,
'quality': quality, 'quality': quality,
'has_drm': has_drm,
'vcodec': 'none' if media_type == 'AUDIO' else None, 'vcodec': 'none' if media_type == 'AUDIO' else None,
} for idx in _extract_m3u8_playlist_indices(manifest_url)) } for idx in _extract_m3u8_playlist_indices(manifest_url))
@ -2122,6 +2123,7 @@ class InfoExtractor:
'protocol': entry_protocol, 'protocol': entry_protocol,
'preference': preference, 'preference': preference,
'quality': quality, 'quality': quality,
'has_drm': has_drm,
} }
resolution = last_stream_inf.get('RESOLUTION') resolution = last_stream_inf.get('RESOLUTION')
if resolution: if resolution:

View File

@ -15,6 +15,7 @@ from ..utils import (
UnsupportedError, UnsupportedError,
determine_ext, determine_ext,
dict_get, dict_get,
extract_basic_auth,
format_field, format_field,
int_or_none, int_or_none,
is_html, is_html,
@ -2372,9 +2373,8 @@ class GenericIE(InfoExtractor):
**smuggled_data.get('http_headers', {}) **smuggled_data.get('http_headers', {})
}) })
new_url = full_response.geturl() new_url = full_response.geturl()
if new_url == urllib.parse.urlparse(url)._replace(scheme='https').geturl(): url = urllib.parse.urlparse(url)._replace(scheme=urllib.parse.urlparse(new_url).scheme).geturl()
url = new_url if new_url != extract_basic_auth(url)[0]:
elif url != new_url:
self.report_following_redirect(new_url) self.report_following_redirect(new_url)
if force_videoid: if force_videoid:
new_url = smuggle_url(new_url, {'force_videoid': force_videoid}) new_url = smuggle_url(new_url, {'force_videoid': force_videoid})