1
0
mirror of https://codeberg.org/polarisfm/youtube-dl synced 2024-11-23 00:54:31 +01:00

[ondemandkorea] add extractor error for odk premium content

This commit is contained in:
Julien Hadley Jack 2020-08-02 20:59:18 +02:00
parent efef17148f
commit abb41d6430

View File

@ -60,6 +60,11 @@ class OnDemandKoreaIE(InfoExtractor):
'This video is only available to ODK PLUS members.', 'This video is only available to ODK PLUS members.',
expected=True) expected=True)
if 'ODK PREMIUM Members Only' in webpage:
raise ExtractorError(
'This video is only available to ODK PREMIUM members.',
expected=True)
title = self._search_regex( title = self._search_regex(
r'class=["\']episode_title["\'][^>]*>([^<]+)', r'class=["\']episode_title["\'][^>]*>([^<]+)',
webpage, 'episode_title', fatal=False) or self._og_search_title(webpage) webpage, 'episode_title', fatal=False) or self._og_search_title(webpage)