mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-07-26 23:28:29 +00:00
Oops
This commit is contained in:
parent
3776347552
commit
5249b8ab4a
@ -51,16 +51,16 @@ def _real_extract(self, url):
|
||||
if format_url:
|
||||
urlh = self._request_webpage(
|
||||
HEADRequest(format_url), event_id, fatal=False, note='Checking stream')
|
||||
ext = urlhandle_detect_ext(urlh)
|
||||
if ext == 'octet-stream':
|
||||
self.report_warning(
|
||||
'The server did not return a valid file extension for the stream URL, '
|
||||
'defaulting to "mp3". Please ensure that the downloaded audio is actually mp3.')
|
||||
ext = 'mp3'
|
||||
if urlh and urlh.status == 200:
|
||||
if not urlh or urlh.status != 200:
|
||||
ext = urlhandle_detect_ext(urlh)
|
||||
if ext == 'octet-stream':
|
||||
self.report_warning(
|
||||
'The server did not return a valid file extension for the stream URL, '
|
||||
'defaulting to "mp3". Please ensure that the downloaded audio is actually mp3.')
|
||||
ext = 'mp3'
|
||||
formats.append({
|
||||
'url': format_url,
|
||||
'ext': urlhandle_detect_ext(urlh),
|
||||
'ext': ext,
|
||||
'vcodec': 'none',
|
||||
})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user