diff --git a/yt_dlp/extractor/bilibili.py b/yt_dlp/extractor/bilibili.py index 4d880daf8b..d5666418b3 100644 --- a/yt_dlp/extractor/bilibili.py +++ b/yt_dlp/extractor/bilibili.py @@ -666,9 +666,8 @@ class BiliBiliIE(BilibiliBaseIE): initial_state = self._search_json(r'window\.__INITIAL_STATE__\s*=', webpage, 'initial state', video_id, default=None) if not initial_state: - if traverse_obj(self._search_json( - r'\s*window\._riskdata_\s*=', webpage, 'risk data', video_id, default=None), 'v_voucher'): - raise ExtractorError('You are downloading too frequently, please wait and try later', expected=True) + if self._search_json(r'\bwindow\._riskdata_\s*=', webpage, 'risk', video_id, default={}).get('v_voucher'): + raise ExtractorError('You have exceeded the rate limit. Try again later', expected=True) query = {'platform': 'web'} prefix = prefix.upper() if prefix == 'BV':