]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/extractor/youtube.py
[cleanup, docs] Misc cleanup
[yt-dlp.git] / yt_dlp / extractor / youtube.py
index 041815a194fa807be24b96309e13505cc96c4b38..6451c08c0b2562da78d4ce845ae1eae0a410e0ab 100644 (file)
@@ -3094,6 +3094,8 @@ def _extract_formats(self, streaming_data, video_id, player_url, is_live):
             # Some formats may have much smaller duration than others (possibly damaged during encoding)
             # Eg: 2-nOtRESiUc Ref: https://github.com/yt-dlp/yt-dlp/issues/2823
             is_damaged = try_get(fmt, lambda x: float(x['approxDurationMs']) < approx_duration - 10000)
+            if is_damaged:
+                self.report_warning(f'{video_id}: Some formats are possibly damaged. They will be deprioritized', only_once=True)
             dct = {
                 'asr': int_or_none(fmt.get('audioSampleRate')),
                 'filesize': int_or_none(fmt.get('contentLength')),