diff --git a/youtube_dlc/extractor/vlive.py b/youtube_dlc/extractor/vlive.py index 874f5203e..38d78eda1 100644 --- a/youtube_dlc/extractor/vlive.py +++ b/youtube_dlc/extractor/vlive.py @@ -120,8 +120,15 @@ class VLiveIE(NaverBaseIE): params = self._parse_json(params, working_id, fatal=False) video_params = try_get(params, lambda x: x["postDetail"]["post"]["officialVideo"]) + if video_params is None: - if 'post' in url: + error_data = try_get(params, lambda x: x["postDetail"]["error"]["data"]) + product_type = try_get(error_data, + [lambda x: x["officialVideo"]["productType"], + lambda x: x["board"]["boardType"]]) + if product_type in ('VLIVE_PLUS', 'VLIVE+'): + self.raise_login_required('This video is only available for VLIVE+ subscribers') + elif 'post' in url: raise ExtractorError('Url does not appear to be a video post.') else: raise ExtractorError('Failed to extract video parameters.') @@ -191,17 +198,6 @@ class VLiveIE(NaverBaseIE): key = key_json["inkey"] long_video_id = video_params["vodId"] - if '' in (long_video_id, key): - init_page = self._download_init_page(video_id) - video_info = self._parse_json(self._search_regex( - (r'(?s)oVideoStatus\s*=\s*({.+?})\s*