aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcoletdjnz <colethedj@protonmail.com>2021-06-11 09:12:56 +1200
committerGitHub <noreply@github.com>2021-06-10 21:12:56 +0000
commit4ba001080fc39c121186f7a799dbe0c87b1906a8 (patch)
treed1239f8781dd20088ecd392535f761014cbc9d83
parent1974e99f4b03a0a8b91bdc75b90c167445d3c229 (diff)
downloadhypervideo-pre-4ba001080fc39c121186f7a799dbe0c87b1906a8.tar.lz
hypervideo-pre-4ba001080fc39c121186f7a799dbe0c87b1906a8.tar.xz
hypervideo-pre-4ba001080fc39c121186f7a799dbe0c87b1906a8.zip
[youtube] Non-fatal alert reporting for unavailable videos page (#401)
Co-Authored by: colethedj, pukkandan
-rw-r--r--yt_dlp/extractor/youtube.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/yt_dlp/extractor/youtube.py b/yt_dlp/extractor/youtube.py
index f88c2f727..9161ea3d1 100644
--- a/yt_dlp/extractor/youtube.py
+++ b/yt_dlp/extractor/youtube.py
@@ -3602,7 +3602,13 @@ class YoutubeTabIE(YoutubeBaseInfoExtractor):
else:
# Youtube may send alerts if there was an issue with the continuation page
- self._extract_and_report_alerts(response, expected=False)
+ try:
+ self._extract_and_report_alerts(response, expected=False)
+ except ExtractorError as e:
+ if fatal:
+ raise
+ self.report_warning(error_to_compat_str(e))
+ return
if not check_get_keys or dict_get(response, check_get_keys):
break
# Youtube sometimes sends incomplete data