catch and raise for referer required

Authored by: bashonly
pull/14021/head
bashonly 3 days ago
parent 038fbf08a5
commit 3dc964795a
No known key found for this signature in database
GPG Key ID: 783F096F253D15B0

@ -1660,7 +1660,12 @@ class VimeoAlbumIE(VimeoBaseInfoExtractor):
album_id = traverse_obj(auth_info, ( album_id = traverse_obj(auth_info, (
'metadata', 'id', {int}, {str_or_none}, {require('album ID')})) 'metadata', 'id', {int}, {str_or_none}, {require('album ID')}))
album, hashed_pass = self._get_album_data_and_hashed_pass(album_id, is_embed, referer) try:
album, hashed_pass = self._get_album_data_and_hashed_pass(album_id, is_embed, referer)
except ExtractorError as e:
if is_embed and not referer and isinstance(e.cause, HTTPError) and e.cause.status == 403:
raise ExtractorError(self._REFERER_HINT, expected=True)
raise
entries = OnDemandPagedList(functools.partial( entries = OnDemandPagedList(functools.partial(
self._fetch_page, album_id, hashed_pass, is_embed, referer), self._PAGE_SIZE) self._fetch_page, album_id, hashed_pass, is_embed, referer), self._PAGE_SIZE)

Loading…
Cancel
Save