From 3dc964795a027f69c1784b8b9b78284b7fe17e06 Mon Sep 17 00:00:00 2001 From: bashonly Date: Thu, 14 Aug 2025 16:57:39 -0500 Subject: [PATCH] catch and raise for referer required Authored by: bashonly --- yt_dlp/extractor/vimeo.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/yt_dlp/extractor/vimeo.py b/yt_dlp/extractor/vimeo.py index 46f6ba9873..722fc0a5a0 100644 --- a/yt_dlp/extractor/vimeo.py +++ b/yt_dlp/extractor/vimeo.py @@ -1660,7 +1660,12 @@ class VimeoAlbumIE(VimeoBaseInfoExtractor): album_id = traverse_obj(auth_info, ( '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( self._fetch_page, album_id, hashed_pass, is_embed, referer), self._PAGE_SIZE)