From 307e5b3606d5f820983f9fe282e8233c9e298635 Mon Sep 17 00:00:00 2001 From: sepro Date: Sun, 13 Jul 2025 00:43:14 +0200 Subject: [PATCH] Apply suggestions from code review Co-authored-by: bashonly <88596187+bashonly@users.noreply.github.com> --- yt_dlp/extractor/mixlr.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/yt_dlp/extractor/mixlr.py b/yt_dlp/extractor/mixlr.py index 54e3ada91..ca85495df 100644 --- a/yt_dlp/extractor/mixlr.py +++ b/yt_dlp/extractor/mixlr.py @@ -51,12 +51,12 @@ def _real_extract(self, url): if format_url: urlh = self._request_webpage( HEADRequest(format_url), event_id, fatal=False, note='Checking stream') - if not urlh or urlh.status != 200: + if urlh and 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.') + 'The server did not return a valid file extension for the stream URL. ' + 'Assuming an mp3 stream; postprocessing may fail if this is incorrect') ext = 'mp3' formats.append({ 'url': format_url, @@ -116,7 +116,6 @@ def _real_extract(self, url): return { 'id': recording_id, - 'is_live': False, **traverse_obj(recording_info, ('data', 'attributes', { 'ext': ('file_format', {str}), 'url': ('url', {url_or_none}),