mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-02 14:37:21 +00:00
Merge branch 'yt-dlp:master' into membership-comment-data
This commit is contained in:
commit
3c3ecc1dc2
|
@ -869,11 +869,12 @@ def _extract_from_api(self, video_id, unlisted_hash=None):
|
||||||
for retry in (False, True):
|
for retry in (False, True):
|
||||||
try:
|
try:
|
||||||
video = self._call_videos_api(video_id, viewer['jwt'], unlisted_hash)
|
video = self._call_videos_api(video_id, viewer['jwt'], unlisted_hash)
|
||||||
|
break
|
||||||
except ExtractorError as e:
|
except ExtractorError as e:
|
||||||
if (not retry and isinstance(e.cause, HTTPError) and e.cause.status == 400
|
if (not retry and isinstance(e.cause, HTTPError) and e.cause.status == 400
|
||||||
and 'password' in traverse_obj(
|
and 'password' in traverse_obj(
|
||||||
e.cause.response.read(),
|
self._webpage_read_content(e.cause.response, e.cause.response.url, video_id, fatal=False),
|
||||||
({bytes.decode}, {json.loads}, 'invalid_parameters', ..., 'field'),
|
({json.loads}, 'invalid_parameters', ..., 'field'),
|
||||||
)):
|
)):
|
||||||
self._verify_video_password(
|
self._verify_video_password(
|
||||||
video_id, self._get_video_password(), viewer['xsrft'])
|
video_id, self._get_video_password(), viewer['xsrft'])
|
||||||
|
|
Loading…
Reference in a new issue