From 2fae8c33630de3c08ae9c3a0ebc382402fbc0f43 Mon Sep 17 00:00:00 2001 From: rasmus Date: Wed, 17 Apr 2024 18:43:38 +0200 Subject: [PATCH] [ie/Boosty] call raise_login_required if subscription required --- yt_dlp/extractor/boosty.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/yt_dlp/extractor/boosty.py b/yt_dlp/extractor/boosty.py index 5381fdaee..b60c98bdd 100644 --- a/yt_dlp/extractor/boosty.py +++ b/yt_dlp/extractor/boosty.py @@ -179,9 +179,6 @@ class BoostyIE(InfoExtractor): f'https://api.boosty.to/v1/blog/{user}/post/{post_id}', post_id, note='Downloading post data', errnote='Unable to download post data', headers=auth_headers) - if not post.get('hasAccess'): - self.report_warning('This post requires a subscription, make sure to include your browser cookies.') - post_title = post.get('title') if not post_title: self.report_warning('Unable to extract post title. Falling back to parsing html page') @@ -218,6 +215,8 @@ class BoostyIE(InfoExtractor): 'thumbnail': (('previewUrl', 'defaultPreview'), {url_or_none}), }, get_all=False)}) + if not post.get('hasAccess'): + self.raise_login_required('This post requires a subscription', True, method='cookies') if not entries: raise ExtractorError('No videos found', expected=True) if len(entries) == 1: