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