[Youtube] Fix unwanted private method __ie_msg in f8b0135850
authorgy-chen <gychen@gyhost.icu>
Sat, 23 Mar 2024 15:30:13 +0000 (23:30 +0800)
committerGitHub <noreply@github.com>
Sat, 23 Mar 2024 15:30:13 +0000 (15:30 +0000)
Fixes `AttributeError no attribute '_YoutubeIE__ie_msg'` if unable to decode n-parameter

youtube_dl/extractor/youtube.py

index db840fc45565dc1b42015767d4b9d6d9ec0b6314..90c16e172bd7fa3303a6089b74f06789b68dd1da 100644 (file)
@@ -1647,10 +1647,10 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
         except JSInterpreter.Exception as e:
             self.report_warning(
                 '%s (%s %s)' % (
-                    self.__ie_msg(
-                        'Unable to decode n-parameter: download likely to be throttled'),
+                    'Unable to decode n-parameter: download likely to be throttled',
                     error_to_compat_str(e),
-                    traceback.format_exc()))
+                    traceback.format_exc()),
+                video_id=video_id)
             return
 
         self.write_debug('Decrypted nsig {0} => {1}'.format(n, ret))