From a4b22a15262f651e869a049d7bda960181f68982 Mon Sep 17 00:00:00 2001 From: dirkf Date: Fri, 3 Feb 2023 01:45:06 +0000 Subject: [PATCH] Small update, force CI --- youtube_dl/extractor/recurbate.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/youtube_dl/extractor/recurbate.py b/youtube_dl/extractor/recurbate.py index 8c1d2be3b..73b6678c9 100644 --- a/youtube_dl/extractor/recurbate.py +++ b/youtube_dl/extractor/recurbate.py @@ -22,6 +22,10 @@ class RecurbateIE(InfoExtractor): 'skip': 'Free videos are available for a limited amount of time and for a single session.', } + @staticmethod + def raise_login_required(msg='Login required: use --cookies to pass your browser's login cookie, or try again later'): + raise ExtractorError(msg, expected=True) + def _real_extract(self, url): video_id = self._match_id(url) webpage = self._download_webpage(url, video_id) @@ -31,9 +35,7 @@ class RecurbateIE(InfoExtractor): get_url = update_url_query('https://recurbate.com/api/get.php', {'video': video_id, 'token': token}) video_webpage = self._download_webpage(get_url, video_id) if 'shall_signin' in video_webpage[:20]: - raise ExtractorError( - "Login required: use --cookies to pass your browser's login cookie, or try again later", - expected=True) + self.raise_login_required() entries = self._parse_html5_media_entries(get_url, video_webpage, video_id) if not entries: raise ExtractorError('No media links found')