Fix per suggestion

Co-authored-by: bashonly <88596187+bashonly@users.noreply.github.com>
pull/14038/head
Junyi Lou 17 hours ago committed by GitHub
parent 54fa1c4b42
commit 34631c50f1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -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'<script\s*>\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':

Loading…
Cancel
Save