From 2d1019542af1f13a9c287969d0f2569570320872 Mon Sep 17 00:00:00 2001 From: pukkandan Date: Sun, 21 Aug 2022 05:17:22 +0530 Subject: [PATCH] [extractor/BiliBiliSearch] Fix infinite loop Closes #4682 --- yt_dlp/extractor/bilibili.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/yt_dlp/extractor/bilibili.py b/yt_dlp/extractor/bilibili.py index 431531508..9467f5f82 100644 --- a/yt_dlp/extractor/bilibili.py +++ b/yt_dlp/extractor/bilibili.py @@ -627,7 +627,9 @@ class BiliBiliSearchIE(SearchInfoExtractor): 'search_type': 'video', 'tids': 0, 'highlight': 1, - })['data'].get('result') or [] + })['data'].get('result') + if not videos: + break for video in videos: yield self.url_result(video['arcurl'], 'BiliBili', str(video['aid']))